Last active
August 29, 2015 13:57
-
-
Save kyokomi/9564023 to your computer and use it in GitHub Desktop.
EventDispatherについての調査資料3
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
bool RogueScene::init() { | |
//... 省略 ... | |
auto foreground_player_listener = EventListenerCustom::create(EVENT_COME_TO_FOREGROUND_ROGUE, [actorSprite](EventCustom* event){ | |
CCLOG("event! EVENT_COME_TO_FOREGROUND_ROGUE actorSprite"); | |
// 左向け左! | |
actorSprite->runLeftAction(); | |
}); | |
this->getEventDispatcher()->addEventListenerWithSceneGraphPriority(foreground_player_listener, actorSprite); | |
// ... 省略 ... | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cocos2d: event! EVENT_COME_TO_FOREGROUND_ROGUE actorSprite | |
cocos2d: event! EVENT_COME_TO_FOREGROUND_ROGUE this |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment