C++ Project 2016-2017: Arkanoid
block_sfml.h
Go to the documentation of this file.
1 
3 #ifndef BLOCK_SFML_H
4 #define BLOCK_SFML_H
5 
6 #include "../../../logic/entity/block/block.h"
7 #include "../../math/transformation.h"
8 
9 #include <SFML/Graphics.hpp>
10 #include <iostream>
11 #include <memory>
12 #include <string>
13 
14 using namespace std;
15 
16 namespace arkanoidSFML {
17 
19  class BlockSFML : virtual public arkanoid::Block {
20  protected:
21  sf::RenderWindow &windowSFML;
22 
23  sf::Sprite sprite;
24  sf::Texture texture;
25 
26  Transformation* transformation;
27 
28  public:
29 
41  BlockSFML(double x, double y, sf::RenderWindow &window, const string &textureFile = "data/sprites/blocks/blue_block.png");
42 
46  ~BlockSFML();
47 
51  void update();
52 
56  void draw() const;
57 
58  };
59 
60 }
61 
62 #endif /* BLOCK_SFML_H */
sf::Sprite sprite
The sprite of the BlockSFML.
Definition: block_sfml.h:23
Singleton: This class provides a method to convert screen pixels to their corresponding coordinates i...
The SFML element that represents the arkanoid::Block in the game.
Definition: block_sfml.h:19
All the game gui elements of the Arkanoid game.
Definition: ball_sfml.cpp:10
The Block in the Arkanoid game, can be hit and destroyed by the Player.
Definition: block.h:18