本文整理汇总了C++中CGameObject::callback方法的典型用法代码示例。如果您正苦于以下问题:C++ CGameObject::callback方法的具体用法?C++ CGameObject::callback怎么用?C++ CGameObject::callback使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CGameObject
的用法示例。
在下文中一共展示了CGameObject::callback方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: use
bool CUsableScriptObject::use(CGameObject* who_use)
{
VERIFY(who_use);
CGameObject* pThis = smart_cast<CGameObject*>(this); VERIFY(pThis);
pThis->callback(GameObject::eUseObject)(pThis->lua_game_object(),who_use->lua_game_object());
return true;
}
示例2:
void anim_script_callback::update( CGameObject &O )
{
if( !is_set )
return;
if(!on_end && !on_begin)
return;
O.callback (GameObject::eScriptAnimation) ( on_end );
on_end = false;
on_begin = false;
}
示例3: use
bool CUsableScriptObject::use(CGameObject* who_use)
{
VERIFY(who_use);
CGameObject* pThis = smart_cast<CGameObject*>(this); VERIFY(pThis);
if ( pThis->lua_game_object() && pThis->lua_game_object()->m_door && (pThis->lua_game_object()->m_door->is_blocked(doors::door_state_open) || pThis->lua_game_object()->m_door->is_blocked(doors::door_state_closed)) )
return false;
pThis->callback(GameObject::eUseObject)(pThis->lua_game_object(),who_use->lua_game_object());
return true;
}