mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2025-12-21 17:56:04 +08:00
add example use CCAction classes with CCSkeleton
This commit is contained in:
parent
fc7cc63413
commit
d8ac89b5df
@ -25,6 +25,12 @@ bool ExampleLayer::init () {
|
||||
skeletonNode->state->setAnimation(animation, true);
|
||||
skeletonNode->debug = true;
|
||||
|
||||
CCAction* fade = CCRepeatForever::create(CCSequence::create(CCFadeOut::create(1),
|
||||
CCFadeIn::create(1),
|
||||
CCDelayTime::create(5),
|
||||
NULL));
|
||||
skeletonNode->runAction(fade);
|
||||
|
||||
CCSize windowSize = CCDirector::sharedDirector()->getWinSize();
|
||||
skeletonNode->setPosition(ccp(windowSize.width / 2, 20));
|
||||
addChild(skeletonNode);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user