448 auto s = Director::getInstance()->getWinSize();
449 auto layer1 = LayerColor::create( Color4B(255, 255, 0, 80), 100, 300);
450 layer1->setPosition(Vec2(s.width/3, s.height/2));
451 layer1->setIgnoreAnchorPointForPosition(
false);
454 auto layer2 = LayerColor::create( Color4B(0, 0, 255, 255), 100, 300);
455 layer2->setPosition(Vec2((s.width/3)*2, s.height/2));
456 layer2->setIgnoreAnchorPointForPosition(
false);
459 auto actionTint = TintBy::create(2, -255, -127, 0);
460 auto actionTintBack = actionTint->reverse();
461 auto seq1 = Sequence::create( actionTint, actionTintBack,
nullptr);
462 layer1->runAction(seq1);
464 auto actionFade = FadeOut::create(2.0f);
465 auto actionFadeBack = actionFade->reverse();
466 auto seq2 = Sequence::create(actionFade, actionFadeBack,
nullptr);
467 layer2->runAction(seq2);
virtual void onEnter() override