HeadBall  1.0
A game
Public Member Functions | Private Attributes | List of all members
HeadBall::GoalPost Class Reference

The Goalpost to be displayed in GameState. More...

#include <GoalPost.hpp>

Collaboration diagram for HeadBall::GoalPost:
Collaboration graph

Public Member Functions

 GoalPost (GameDataRef data)
 Construct a new Goal Post object. More...
 
void init (sf::Vector2f position, bool isLeft=true)
 Initiate the GoalPost object. More...
 
sf::Sprite sprite ()
 Return the sprite to be displayed in the GameState. More...
 

Private Attributes

GameDataRef _data
 The Shared Pointer of game data. More...
 
sf::Sprite _sprite
 The sprite of the goal post. More...
 

Detailed Description

The Goalpost to be displayed in GameState.

Constructor & Destructor Documentation

◆ GoalPost()

HeadBall::GoalPost::GoalPost ( GameDataRef  data)

Construct a new Goal Post object.

Parameters
dataThe Shared Pointer of game data

Member Function Documentation

◆ init()

void HeadBall::GoalPost::init ( sf::Vector2f  position,
bool  isLeft = true 
)

Initiate the GoalPost object.

Parameters
positionThe position where the GoalPost is placed
isLeftTo specify whether the GoalPost is left post or right post, for keeping appropriate sprite for appropriate post

◆ sprite()

sf::Sprite HeadBall::GoalPost::sprite ( )

Return the sprite to be displayed in the GameState.

Returns
sf::Sprite The sprite to be displayed

Member Data Documentation

◆ _data

GameDataRef HeadBall::GoalPost::_data
private

The Shared Pointer of game data.

◆ _sprite

sf::Sprite HeadBall::GoalPost::_sprite
private

The sprite of the goal post.


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