galaxy 1.0.0
Real-Time C++23 Game Programming Framework. Built on data-driven design principles and agile software engineering.
Loading...
Searching...
No Matches
State.hpp
Go to the documentation of this file.
1
7
8#ifndef GALAXY_STATE_STATE_HPP_
9#define GALAXY_STATE_STATE_HPP_
10
11namespace galaxy
12{
13 namespace state
14 {
18 class State
19 {
20 public:
24 virtual ~State() = default;
25
29 virtual void on_push() = 0;
30
34 virtual void on_pop() = 0;
35
39 virtual void update() = 0;
40
41 protected:
45 State() = default;
46 };
47 } // namespace state
48} // namespace galaxy
49
50#endif
A state to use in a finite state machine.
Definition State.hpp:19
virtual void update()=0
Handle state events / update state data.
State()=default
Constructor.
virtual void on_pop()=0
Triggered when state is popped off the stack.
virtual ~State()=default
Virtual destructor.
virtual void on_push()=0
Triggered when state is pushed onto the stack.
Timer.hpp galaxy.
Definition Async.hpp:17