HeadBall  1.0
A game
AboutState.hpp
Go to the documentation of this file.
1 #pragma once
2 
3 #include <SFML/Graphics.hpp>
4 
5 #include "State.hpp"
6 #include "Game.hpp"
7 
8 namespace HeadBall {
13  class AboutState : public State {
14  public:
15 
21  AboutState (GameDataRef data);
22 
27  void init ( );
28 
33  void handleInput ( );
34 
39  void update ( );
40 
45  void draw ( );
46 
47  private:
48 
50 
51  sf::Sprite _background;
52  sf::Sprite _backBtn;
53  sf::Sprite _exitBtn;
54 
55  sf::Sound _btnClickSfx;
56 
57  sf::Text _text;
58  };
59 }
Class for About page.
Definition: AboutState.hpp:13
void update()
Update state data.
Definition: AboutState.cpp:89
sf::Sound _btnClickSfx
Sound effect for button click.
Definition: AboutState.hpp:55
void draw()
Draw state objects.
Definition: AboutState.cpp:91
sf::Sprite _exitBtn
Button to exit from the game.
Definition: AboutState.hpp:53
void handleInput()
Handle user input.
Definition: AboutState.cpp:55
AboutState(GameDataRef data)
Construct a new About State object.
Definition: AboutState.cpp:7
void init()
Initialize state related data.
Definition: AboutState.cpp:9
sf::Text _text
Text to display about information.
Definition: AboutState.hpp:57
sf::Sprite _background
Background sprite to draw on the screen.
Definition: AboutState.hpp:51
sf::Sprite _backBtn
Button to return back.
Definition: AboutState.hpp:52
GameDataRef _data
The shared pointer for all the game data.
Definition: AboutState.hpp:49
Abstract based class which inherits all the states of the game.
Definition: State.hpp:8
Custom namespace used throughout the project.
Definition: AboutState.cpp:6
std::shared_ptr< GameData > GameDataRef
The Shared Pointer of GameData Struct.
Definition: Game.hpp:39