mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-02-06 23:34:53 +08:00
Fixed cocos2d-x example leaking skeleton animation node.
This commit is contained in:
parent
adb406a8ac
commit
4ea202a1e6
@ -62,6 +62,7 @@ bool ExampleLayer::init () {
|
||||
CCSize windowSize = CCDirector::sharedDirector()->getWinSize();
|
||||
skeletonNode->setPosition(ccp(windowSize.width / 2, 20));
|
||||
addChild(skeletonNode);
|
||||
skeletonNode->release();
|
||||
|
||||
scheduleUpdate();
|
||||
|
||||
@ -74,4 +75,5 @@ void ExampleLayer::update (float deltaTime) {
|
||||
} else {
|
||||
if (skeletonNode->states[0]->time > 1) skeletonNode->setAnimation("walk", true);
|
||||
}
|
||||
// if (skeletonNode->states[0]->time > 0.1) CCDirector::sharedDirector()->replaceScene(ExampleLayer::scene());
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user