コード例 #1
0
void LuaEventNode::setLuaTouchEnabled(bool enabled)
{
    if (_bTouchEnabled != enabled)
    {
        _bTouchEnabled = enabled;

        if (enabled)
        {
            registerWithTouchDispatcher();
        }
        else
        {
            unregisterWithTouchDispatcher();
        }
    }
}
コード例 #2
0
ファイル: Item.cpp プロジェクト: hanxu101/projectx
void Item::onExit()
{
    unregisterWithTouchDispatcher();
    GameObject::onExit();
}