it is a class for holding various character trackers by their name.
More...
#include <GameNetCommon.h>
it is a class for holding various character trackers by their name.
some network object, such as the COPCObject and EnvSimClient may derive from it.
§ CreateCharTracker()
CCharacterTracker * ICharacterTrackerContainer::CreateCharTracker |
( |
const char * |
sName = NULL | ) |
|
create a new character tracker with the given name.
If the tracker already exists, it will be emptied.
- Parameters
-
sName | if this is NULL, it means this character. Otherwise, it is a character in its perception. |
- Returns
- the tracker created is returned.
§ GetCharTracker()
CCharacterTracker * ICharacterTrackerContainer::GetCharTracker |
( |
const char * |
sName = NULL | ) |
|
Get the tracker for a character.
- Parameters
-
sName | if this is NULL, it means this character. Otherwise, it is a character in its perception. |
- Returns
- if NULL, the tracker is not found and one should call CreateCharTracker() to create it.
§ GetLastTrackerGCTime()
int ParaEngine::ICharacterTrackerContainer::GetLastTrackerGCTime |
( |
| ) |
|
|
inline |
get last character tracker garbage collection time.
§ GetTimeLag()
int ParaEngine::ICharacterTrackerContainer::GetTimeLag |
( |
| ) |
|
|
inline |
get the time since last network synchronization.
§ RemoveCharTracker() [1/2]
bool ParaEngine::ICharacterTrackerContainer::RemoveCharTracker |
( |
const char * |
sName | ) |
|
remove a given character tacker by name
- Parameters
-
- Returns
- true if removed.
§ RemoveCharTracker() [2/2]
int ICharacterTrackerContainer::RemoveCharTracker |
( |
int |
nBeforePerceivedTime | ) |
|
remove any tracker whose perceived time is smaller than or equal to nBeforePerceivedTime.
this function may be called periodically at low frame rate to release memory. note: it will not remove newly created trackers, which has time 0.
- Parameters
-
nBeforePerceivedTime | this should be above 1 to prevent newly created trackers to be removed. |
- Returns
- the number of tackers removed are returned
§ ResetCharTrackers()
void ICharacterTrackerContainer::ResetCharTrackers |
( |
| ) |
|
reset all character trackers.
§ SetLastTrackerGCTime()
void ParaEngine::ICharacterTrackerContainer::SetLastTrackerGCTime |
( |
int |
nLag | ) |
|
|
inline |
set last character tracker garbage collection time.
§ SetTimeLag()
void ParaEngine::ICharacterTrackerContainer::SetTimeLag |
( |
int |
nLag | ) |
|
|
inline |
set the time since last network synchronization.
The documentation for this class was generated from the following files:
- Client/trunk/ParaEngineClient/Engine/GameNetCommon.h
- Client/trunk/ParaEngineClient/Engine/GameNetCommon.cpp