C++ Project 2016-2017: Arkanoid
|
The SFML element that represents the arkanoid::Wall in the game. More...
#include <wall_sfml.h>
Public Member Functions | |
WallSFML (double x, double y, sf::RenderWindow &window, const string &textureFile="data/sprites/wall/wall.png") | |
~WallSFML () | |
void | update () |
void | draw () const |
![]() | |
Wall () | |
Wall (double x, double y, pair< double, double > size=make_pair(1, 1)) | |
~Wall () | |
void | update () |
void | draw () const |
![]() | |
Entity () | |
Entity (double x, double y, pair< double, double > newSize=make_pair(1.0, 1.0)) | |
virtual | ~Entity () |
Vector2D | getPosition () const |
void | setPosition (double x, double y) |
void | setPosition (const Vector2D &vector) |
void | setSize (pair< double, double > newSize) |
pair< double, double > | getSize () const |
bool | collidesWith (const Entity &other) const |
Additional Inherited Members | |
![]() | |
Vector2D | position |
The current position of the Entity (in the 9x7 grid). | |
pair< double, double > | size |
The size (width and height respectively) of the Entity. | |
The SFML element that represents the arkanoid::Wall in the game.
Definition at line 19 of file wall_sfml.h.
arkanoidSFML::WallSFML::WallSFML | ( | double | x, |
double | y, | ||
sf::RenderWindow & | window, | ||
const string & | textureFile = "data/sprites/wall/wall.png" |
||
) |
Constructor.
Creates a WallSFML sprite in the World at a specific position in the game window. Also applies the texture to this WallSFML.
x | The x (on screen) position of the arkanoid::Wall. |
y | The y (on screen) position of the arkanoid::Wall. |
window | The SFML window. |
textureFile | (optional) The file that contains the texture of the WallSFML. |
Definition at line 12 of file wall_sfml.cpp.
arkanoidSFML::WallSFML::~WallSFML | ( | ) |
Destructor.
Definition at line 30 of file wall_sfml.cpp.
|
virtual |
Draws the WallSFML in the game window.
Implements arkanoid::Entity.
Definition at line 36 of file wall_sfml.cpp.
|
virtual |