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

The Wall (left/right/top side) in the Arkanoid game that represents a single "square". More...

#include <wall.h>

Inheritance diagram for arkanoid::Wall:
arkanoid::Entity arkanoid::Block arkanoidSFML::WallSFML arkanoid::BallSpeedBlock arkanoid::InvisBlock arkanoid::PlayerSpeedBlock arkanoidSFML::BlockSFML arkanoidSFML::BallSpeedBlockSFML arkanoidSFML::InvisBlockSFML arkanoidSFML::PlayerSpeedBlockSFML arkanoidSFML::BallSpeedBlockSFML arkanoidSFML::InvisBlockSFML arkanoidSFML::PlayerSpeedBlockSFML

Public Member Functions

 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 Wall (left/right/top side) in the Arkanoid game that represents a single "square".

Definition at line 17 of file wall.h.

Constructor & Destructor Documentation

◆ Wall() [1/2]

arkanoid::Wall::Wall ( )

Default Constructor.

Initialise the Wall at origin ([0, 0]) in the World.

Definition at line 12 of file wall.cpp.

◆ Wall() [2/2]

arkanoid::Wall::Wall ( double  x,
double  y,
pair< double, double >  size = make_pair(1, 1) 
)

Constructor.

Initialise the Wall at a specific position in the World.

Parameters
xThe x position (in the grid) of the Wall.
yThe y position (in the grid) of the Wall.
size(optional) The size (width and height respectively) of the Wall.

Definition at line 14 of file wall.cpp.

◆ ~Wall()

arkanoid::Wall::~Wall ( )

Destructor.

Definition at line 16 of file wall.cpp.

Member Function Documentation

◆ draw()

void arkanoid::Wall::draw ( ) const
virtual

Do nothing...

Implements arkanoid::Entity.

Definition at line 20 of file wall.cpp.

◆ update()

void arkanoid::Wall::update ( )
virtual

Do nothing...

Implements arkanoid::Entity.

Definition at line 18 of file wall.cpp.


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