本文整理汇总了C++中CCustomMonster::memory方法的典型用法代码示例。如果您正苦于以下问题:C++ CCustomMonster::memory方法的具体用法?C++ CCustomMonster::memory怎么用?C++ CCustomMonster::memory使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CCustomMonster
的用法示例。
在下文中一共展示了CCustomMonster::memory方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1:
void CScriptGameObject::enable_memory_object (CScriptGameObject *game_object, bool enable)
{
CCustomMonster *monster = smart_cast<CCustomMonster*>(&object());
if (!monster)
ai().script_engine().script_log (ScriptStorage::eLuaMessageTypeError,"CGameObject : cannot access class member enable_memory_object!");
else
monster->memory().enable (&game_object->object(),enable);
}
示例2:
void CScriptGameObject::set_enemy_callback ()
{
CCustomMonster *monster = smart_cast<CCustomMonster*>(&object());
if (!monster) {
ai().script_engine().script_log (ScriptStorage::eLuaMessageTypeError,"CCustomMonster : cannot access class member set_enemy_callback!");
return;
}
monster->memory().enemy().useful_callback().clear();
}
示例3: memory_position
Fvector CScriptGameObject::memory_position(const CScriptGameObject &lua_game_object)
{
CCustomMonster *monster = smart_cast<CCustomMonster*>(&object());
if (!monster) {
ai().script_engine().script_log (ScriptStorage::eLuaMessageTypeError,"CScriptEntity : cannot access class member memory!");
return (Fvector().set(0.f,0.f,0.f));
}
else
return (monster->memory().memory_position(&lua_game_object.object()));
}
示例4: enemy_see_me_now
bool CMonsterEnemyManager::enemy_see_me_now()
{
if ( Actor() == enemy )
{
return (Actor()->memory().visual().visible_right_now(monster));
}
else
{
CCustomMonster *cm = const_cast<CEntityAlive*>(enemy)->cast_custom_monster();
if ( cm )
{
return cm->memory().visual().visible_right_now(monster);
}
}
return false;
}