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

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

#include <invis_block_sfml.h>

Inheritance diagram for arkanoidSFML::InvisBlockSFML:
arkanoid::InvisBlock arkanoidSFML::BlockSFML arkanoid::Block arkanoid::Block arkanoid::Wall arkanoid::Wall arkanoid::Entity arkanoid::Entity

Public Member Functions

 InvisBlockSFML (double x, double y, sf::RenderWindow &window, const string &textureFile="data/sprites/blocks/red_block.png")
 
 ~InvisBlockSFML ()
 
void update ()
 
void draw () const
 
- Public Member Functions inherited from arkanoid::InvisBlock
 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
 
- Public Member Functions inherited from arkanoidSFML::BlockSFML
 BlockSFML (double x, double y, sf::RenderWindow &window, const string &textureFile="data/sprites/blocks/blue_block.png")
 
 ~BlockSFML ()
 

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.
 
- Protected Attributes inherited from arkanoidSFML::BlockSFML
sf::RenderWindow & windowSFML
 
sf::Sprite sprite
 The sprite of the BlockSFML.
 
sf::Texture texture
 
Transformationtransformation
 

Detailed Description

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

Definition at line 19 of file invis_block_sfml.h.

Constructor & Destructor Documentation

◆ InvisBlockSFML()

arkanoidSFML::InvisBlockSFML::InvisBlockSFML ( double  x,
double  y,
sf::RenderWindow &  window,
const string &  textureFile = "data/sprites/blocks/red_block.png" 
)

Constructor.

Creates a InvisBlockSFML sprite in the World at a specific position in the game window. Also applies the texture to this InvisBlockSFML.

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

Definition at line 12 of file invis_block_sfml.cpp.

◆ ~InvisBlockSFML()

arkanoidSFML::InvisBlockSFML::~InvisBlockSFML ( )

Destructor.

Definition at line 14 of file invis_block_sfml.cpp.

Member Function Documentation

◆ draw()

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

Draws the InvisBlockSFML in the game window.

Reimplemented from arkanoidSFML::BlockSFML.

Definition at line 18 of file invis_block_sfml.cpp.

◆ update()

void arkanoidSFML::InvisBlockSFML::update ( )
virtual

Do nothing...

Reimplemented from arkanoidSFML::BlockSFML.

Definition at line 16 of file invis_block_sfml.cpp.


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