本文整理汇总了C++中IEntityClass::GetScriptTable方法的典型用法代码示例。如果您正苦于以下问题:C++ IEntityClass::GetScriptTable方法的具体用法?C++ IEntityClass::GetScriptTable怎么用?C++ IEntityClass::GetScriptTable使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IEntityClass
的用法示例。
在下文中一共展示了IEntityClass::GetScriptTable方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: CacheActorClassResources
// ===========================================================================
// Cache the resources of an actor class (pre-load them).
//
// In: The LUA function handler.
// In: The name of the actor entity class that we should pre-load
// (case-sensitive) (NULL is invalid!)
//
int CScriptBind_Game::CacheActorClassResources(IFunctionHandler *pH, const char* actorEntityClassName)
{
if (actorEntityClassName == NULL)
{
CryWarning(VALIDATOR_MODULE_GAME, VALIDATOR_WARNING,
"CacheActorClassResources(): Invalid entity actor class name!");
}
else
{
IEntityClass* entityClass = gEnv->pEntitySystem->GetClassRegistry()->FindClass(actorEntityClassName);
if (entityClass == NULL)
{
CryWarning(VALIDATOR_MODULE_GAME, VALIDATOR_WARNING,
"CacheActorClassResources(): Unable to cache entity actor class resource '%s'!", actorEntityClassName);
}
else
{
g_pGame->GetGameCache().CacheActorClass(entityClass, entityClass->GetScriptTable());
}
}
return pH->EndFunction();
}