void Test::onEnter()
{
Layer::onEnter();
////使用png图片做成精灵帧,精灵帧创建精灵对象
auto spriteFrame = SpriteFrame::create("mp.png", Rect(0, 81.25 * 2, 81.25, 81.25));
sprite = Sprite::createWithSpriteFrame(spriteFrame);
sprite->setPosition(Vec2(400, 500));
this->addChild(sprite);
auto scene = HelloWorld::createScene();
Director::getInstance()->replaceScene(scene);
log("onEnter");
}
void Test::onEnterTransitionDidFinsh()
{
Layer::onEnterTransitionDidFinish();
log("onEnterTransitionDidFinsh");
}
void Test::onExit()
{
Layer::onExit();
log("onExit");
}
void Test::onExitTransitionDidStart()
{
Layer::onExitTransitionDidStart();
log("onExitTransitionDidStart");
}