Cafu Engine
DeathMatch::GameImplT Class Reference

This class provides the "DeathMatch" implementation of the GameI interface. More...

#include "GameImpl.hpp"

Inheritance diagram for DeathMatch::GameImplT:

Public Member Functions

void Initialize (bool AsClient, bool AsServer, ModelManagerT &ModelMan)
 Called to initialize the game. More...
 
void Release ()
 Called to shutdown the game. More...
 
const cf::TypeSys::TypeInfoManTGetEntityTIM () const
 Returns the type information manager with the entity hierarchy. More...
 
IntrusivePtrT< GameEntityICreateGameEntity (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)
 Creates a new entity of the given type. More...
 
- Public Member Functions inherited from cf::GameSys::GameI
virtual ~GameI ()
 The virtual destructor, so that derived classes can safely be deleted via a GameI (base class) pointer. More...
 

Static Public Member Functions

static GameImplTGetInstance ()
 Returns the singleton instance of this class. More...
 

Detailed Description

This class provides the "DeathMatch" implementation of the GameI interface.

Member Function Documentation

IntrusivePtrT< GameEntityI > GameImplT::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 
)
virtual

Creates a new entity of the given type.

Parameters
TIThe type of entity to create.
EntityThe associated entity in the cf::GameSys::WorldT.
PropertiesThe 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.
RootNodeThe root node of the scene graph of this entity as defined in the map file. NULL if the entity is created "dynamically".
IDThe global unique ID of this entity (in the current map).
GameWorldPointer to the game world implementation.
Returns
a pointer to the newly created game entity.

Implements cf::GameSys::GameI.

const cf::TypeSys::TypeInfoManT & GameImplT::GetEntityTIM ( ) const
virtual

Returns the type information manager with the entity hierarchy.

Implements cf::GameSys::GameI.

GameImplT & GameImplT::GetInstance ( )
static

Returns the singleton instance of this class.

void GameImplT::Initialize ( bool  AsClient,
bool  AsServer,
ModelManagerT ModelMan 
)
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.

Parameters
AsClientTells whether we're running as client.
AsServerTells whether we're running as server.
ModelManThe manager for all models that are used in this game.

Implements cf::GameSys::GameI.

void GameImplT::Release ( )
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.

Implements cf::GameSys::GameI.


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