Cocos2d-x v3.x … アクション系。さっと動きを確認して流そう。
今回のチュートリアル … TintBy/TintTo, FadeTo, FadeIn/FadeOut
Cocos2d-x v3 C++ Tutorial 17 – Tinting Using TintBy
https://www.youtube.com/watch?v=KvYRlTxxOWI
Cocos2d-x v3 C++ Tutorial 18 – Tinting Using TintTo
https://www.youtube.com/watch?v=uJQUZiORWtk
Cocos2d-x v3 C++ Tutorial 19 – Fading Using FadeTo
https://www.youtube.com/watch?v=B0zlIVOI5yI
Cocos2d-x v3 C++ Tutorial 20 – Fading Using FadeIn
https://www.youtube.com/watch?v=-D6iXQRv7Bk
Cocos2d-x v3 C++ Tutorial 21 – Fading Using FadeOut
https://www.youtube.com/watch?v=osZrBYYlnTc
えーい、これもまとめてテストww ^^
Size visibleSize = Director::getInstance()->getVisibleSize(); Point origin = Director::getInstance()->getVisibleOrigin(); { auto sprite = Sprite::create("CloseNormal.png"); auto position = (Point(visibleSize) * 0.5f) + origin; sprite->setPosition(position); this->addChild(sprite, 0); //Tutorial 17 - 21 { auto action = Sequence::create(CCDelayTime::create(1.0f), //Tutorial 17 TintBy::create(1.5f, -255, -255, 0), //Tutorial 18 TintTo::create(1.5f, 255, 0, 0), //Reset Tutorial 17,18 TintTo::create(1.5f, 255, 255, 255), //Tutorial 19 FadeTo::create(1.5f, 128), //Tutorial 20 FadeIn::create(1.5f), //Tutorial 21 FadeOut::create(1.5f), NULL); sprite->runAction(action); } }
まぁ、この辺は大丈夫でしょう。 ^^