|
C++ Project 2016-2017: Arkanoid
|
A "special" Block: when hit with a Ball, make the Ball invisible. More...
#include <invis_block.h>
Public Member Functions | |
| InvisBlock () | |
| InvisBlock (double x, double y, pair< double, double > size=make_pair(1, 2)) | |
| ~InvisBlock () | |
| void | update () |
| void | draw () const |
| void | effectBall (unique_ptr< Ball > &ball) const |
Public Member Functions inherited from arkanoid::Block | |
| Block () | |
| Block (double x, double y, pair< double, double > size=make_pair(1, 2)) | |
| ~Block () | |
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. | |
A "special" Block: when hit with a Ball, make the Ball invisible.
Definition at line 16 of file invis_block.h.
| arkanoid::InvisBlock::InvisBlock | ( | ) |
Default Constructor.
Initialise the InvisBlock at origin ([0, 0]) in the World.
Definition at line 11 of file invis_block.cpp.
| arkanoid::InvisBlock::InvisBlock | ( | double | x, |
| double | y, | ||
| pair< double, double > | size = make_pair(1, 2) |
||
| ) |
Constructor.
Initialise the InvisBlock at a specific position in the World.
| x | The x position (in the grid) of the InvisBlock. |
| y | The y position (in the grid) of the InvisBlock. |
| size | (optional) The size (width and height respectively) of the InvisBlock. |
Definition at line 13 of file invis_block.cpp.
| arkanoid::InvisBlock::~InvisBlock | ( | ) |
Destructor.
Definition at line 15 of file invis_block.cpp.
|
virtual |
| void arkanoid::InvisBlock::effectBall | ( | unique_ptr< Ball > & | ball | ) | const |
Activate this InvisBlock 'speciality': make the Ball invisible for a period of time.
| ball | The Ball that will be effected. |
Definition at line 25 of file invis_block.cpp.
|
virtual |
1.8.13