Abstract class using the Curiously Recurring Template Pattern that users should inherit from and insert Fields into that represent user-input.
#include <nrg_input.h>
Public Member Functions | |
void | addPredictionFunc (std::function< void(CRTP &)> &&func) |
NYI: Adds a function that is called client-side each frame to predict a Field's value before it is confirmed by the Server. | |
void | doPrediction () |
NYI: Do prediction of inputs client-side. | |
Public Member Functions inherited from nrg::InputBase | |
void | markUpdated (bool b) |
bool | readFromPacket (Packet &p) |
void | writeToPacket (Packet &p) const |
virtual void | onUpdate (Player &player)=0 |
Virtual function called Server-side when the Player player has sent some new input. | |
Additional Inherited Members | |
Protected Member Functions inherited from nrg::FieldContainer | |
FieldContainer () | |
Standard Constructor. | |
FieldContainer (const FieldContainer ©) | |
Copy Constructor. | |
FieldContainer & | operator= (const FieldContainer ©) |
Assignment Operator. | |
FieldBase * | getFirstField () const |
Return the first field in this FieldContainer's internal linked-list. | |
size_t | getNumFields () const |
Returns the number of fields in this FieldContainer's linked-list. | |