HeadBall  1.0
A game
State.hpp
Go to the documentation of this file.
1 #pragma once
2 
3 namespace HeadBall {
8  class State {
9  public:
14  virtual void init ( ) = 0;
15 
20  virtual void handleInput ( ) = 0;
21 
26  virtual void update ( ) = 0;
27 
32  virtual void draw ( ) = 0;
33 
38  virtual void pause ( ) { }
39 
44  virtual void resume ( ) { }
45 
50  virtual void animate ( ) { }
51 
56  virtual ~State ( ) = default;
57  };
58 }
Abstract based class which inherits all the states of the game.
Definition: State.hpp:8
virtual void resume()
Virtual function for resuming the object.
Definition: State.hpp:44
virtual void animate()
Vitrual function for performing animations.
Definition: State.hpp:50
virtual ~State()=default
Destroy the State object.
virtual void init()=0
Pure virtual function for initializing state related data.
virtual void draw()=0
Pure virtual function for drawing state objects.
virtual void update()=0
Pure virtual function for updating state data.
virtual void pause()
Virtual function for pausing the state.
Definition: State.hpp:38
virtual void handleInput()=0
Pure virtual function for handling user input.
Custom namespace used throughout the project.
Definition: AboutState.cpp:6