C++ Project 2016-2017: Arkanoid
Public Member Functions | List of all members
arkanoidSFML::WallSFML Class Reference

The SFML element that represents the arkanoid::Wall in the game. More...

#include <wall_sfml.h>

Inheritance diagram for arkanoidSFML::WallSFML:
arkanoid::Wall arkanoid::Entity

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
 
- Public Member Functions inherited from arkanoid::Wall
 Wall ()
 
 Wall (double x, double y, pair< double, double > size=make_pair(1, 1))
 
 ~Wall ()
 
void update ()
 
void draw () const
 
- Public Member Functions inherited from arkanoid::Entity
 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

- Protected Attributes inherited from arkanoid::Entity
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.
 

Detailed Description

The SFML element that represents the arkanoid::Wall in the game.

Definition at line 19 of file wall_sfml.h.

Constructor & Destructor Documentation

◆ WallSFML()

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.

Parameters
xThe x (on screen) position of the arkanoid::Wall.
yThe y (on screen) position of the arkanoid::Wall.
windowThe SFML window.
textureFile(optional) The file that contains the texture of the WallSFML.

Definition at line 12 of file wall_sfml.cpp.

◆ ~WallSFML()

arkanoidSFML::WallSFML::~WallSFML ( )

Destructor.

Definition at line 30 of file wall_sfml.cpp.

Member Function Documentation

◆ draw()

void arkanoidSFML::WallSFML::draw ( ) const
virtual

Draws the WallSFML in the game window.

Implements arkanoid::Entity.

Definition at line 36 of file wall_sfml.cpp.

◆ update()

void arkanoidSFML::WallSFML::update ( )
virtual

Do nothing...

Implements arkanoid::Entity.

Definition at line 32 of file wall_sfml.cpp.


The documentation for this class was generated from the following files: