LibNRG  0.0.1
Networking for Real-time Games library
 All Classes Files Functions Variables Friends
nrg::ClientGameState Class Reference
Inheritance diagram for nrg::ClientGameState:
nrg::State nrg::EntityManager

Public Member Functions

bool init (Client *, Server *, Player *)
 Called to (re)initialise this State instance, for Client-side c won't be null, but s and p will, opposite is true for Server-side.
 
bool onRecvPacket (Packet &p, PacketFlags f)
 Called when a Packet is recieved and this is the active State, f shows if the packet was out-of-order or not.
 
bool needsUpdate () const
 Called to see if the State would like to be updated.
 
size_t getTimeoutSeconds () const
 Returns a time that the state can go without needsUpdate() returning true, after which update() will be called with f set to STATE_TIMED_OUT.
 
StateResult update (StateConnectionOut &out, StateFlags f)
 Called to update the state (or on a timeout) allowing it to optionally send some Packets using out.
 
void registerEntity (Entity *e)
 
void registerMessage (const MessageBase &m)
 
void registerMessage (MessageBase &&m)
 
void sendMessage (const MessageBase &m)
 
double getInterpTimer () const
 
const ClientStatsgetClientStats () const
 
void startRecordingReplay (const char *filename)
 
void stopRecordingReplay ()
 
- Public Member Functions inherited from nrg::State
virtual ~State ()
 Default destructor.
 
- Public Member Functions inherited from nrg::EntityManager
virtual void markEntityUpdated (Entity &e)
 
virtual void unregisterEntity (Entity &e)
 
virtual bool supportsPrediction () const
 
virtual InputBasegetInput () const
 

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