The game interface, specified as an ABC so that is can be used without linked (module-local) implementation. More...
#include "Game.hpp"
Public Member Functions | |
virtual void | Initialize (bool AsClient, bool AsServer, ModelManagerT &ModelMan)=0 |
Called to initialize the game. More... | |
virtual void | Release ()=0 |
Called to shutdown the game. More... | |
virtual const cf::TypeSys::TypeInfoManT & | GetEntityTIM () const =0 |
Returns the type information manager with the entity hierarchy. More... | |
virtual IntrusivePtrT < GameEntityI > | CreateGameEntity (const cf::TypeSys::TypeInfoT *TI, IntrusivePtrT< cf::GameSys::EntityT > Entity, const std::map< std::string, std::string > &Properties, const cf::SceneGraph::GenericNodeT *RootNode, unsigned long ID, cf::GameSys::GameWorldI *GameWorld)=0 |
Creates a new entity of the given type. More... | |
virtual | ~GameI () |
The virtual destructor, so that derived classes can safely be deleted via a GameI (base class) pointer. More... | |
The game interface, specified as an ABC so that is can be used without linked (module-local) implementation.
This interface is implemented by the game DLL, and thus defines the essence of a game/MOD. It is used (only) by the engine to run the game.
|
inlinevirtual |
The virtual destructor, so that derived classes can safely be deleted via a GameI (base class) pointer.
|
pure virtual |
Creates a new entity of the given type.
TI | The type of entity to create. |
Entity | The associated entity in the cf::GameSys::WorldT. |
Properties | The properties dictionary in the map file of this entity (empty if the entity is created "dynamically"). Contains especially the "classname" key that was used by the caller to determine TI. |
RootNode | The root node of the scene graph of this entity as defined in the map file. NULL if the entity is created "dynamically". |
ID | The global unique ID of this entity (in the current map). |
GameWorld | Pointer to the game world implementation. |
Implemented in DeathMatch::GameImplT.
|
pure virtual |
Returns the type information manager with the entity hierarchy.
Implemented in DeathMatch::GameImplT.
|
pure virtual |
Called to initialize the game.
This function is called exactly once as the very first function after the game has been loaded, not each time a new world is about to be loaded.
AsClient | Tells whether we're running as client. |
AsServer | Tells whether we're running as server. |
ModelMan | The manager for all models that are used in this game. |
Implemented in DeathMatch::GameImplT.
|
pure virtual |
Called to shutdown the game.
This function is called exactly once as the very last function before the game is released, not each time a world is being freed.
Implemented in DeathMatch::GameImplT.