Skip to content

Instantly share code, notes, and snippets.

@jiyuujin
Last active September 20, 2016 10:25
Show Gist options
  • Save jiyuujin/6c31411ff2bc87dd09cbcbc8cc40830e to your computer and use it in GitHub Desktop.
Save jiyuujin/6c31411ff2bc87dd09cbcbc8cc40830e to your computer and use it in GitHub Desktop.
Actionを利用する際「連続タップを考慮せず」に注意。一方連続タップに無関係なschedule_selector
private:
bool pFlag = false;
void GameScene::Create() {
this->scheduleOnce( schedule_selector( GameScene::DisableFlag ), 3 );
this->runAction( Sequence::create( DelayTime::create(3), CallFunc::create([this] () { DisableFlag(); }), NULL );
}
void GameScene::DisableFlag(float d) {
this->setFlag(false);
pFlag = n;
}
void GameScene::DisableFlag() {
this->setFlag(false);
pFlag = n;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment