25 #ifndef NRG_STATE_MANAGER
26 #define NRG_STATE_MANAGER
29 #include <type_traits>
36 struct TransitionState :
public State {
37 void pre_init(State* old_s, State* new_s);
38 bool init(Client*, Server*, Player*);
39 bool onRecvPacket(Packet& p, PacketFlags f);
40 bool needsUpdate()
const;
41 StateResult update(StateConnectionOut& out, StateFlags f);
42 size_t getTimeoutSeconds()
const;
45 bool client_mode, starting, resend, done;
46 State *old_state, *new_state;
54 StateManager(Client* c, Server* s, Player* p);
57 StateManager(Server* s, Player* p);
60 StateManager(Client* c);
63 void addState(State& s);
66 bool onRecvPacket(Packet& packet, PacketFlags f);
69 Status update(StateConnectionOut& out);
71 std::vector<State*> states;
73 TransitionState transition;
Common defines and includes used by all the other nrg header files.
Functionality related to the State abstract class.