Beispiel #1
0
void PauseLayer::back(Ref* obj)
{
	_eventDispatcher->removeEventListener(_listener);
	auto main = (MainScene*)this->getParent();
	main->onTouchResume();
	this->removeFromParentAndCleanup(true);
}
Beispiel #2
0
void PauseLayer::home(Ref* obj)
{
	_eventDispatcher->removeEventListener(_listener);
	auto main = (MainScene*)this->getParent();
	main->onTouchResume();
	this->removeFromParentAndCleanup(true);
	auto start = StartScene::createScene();
	Director::getInstance()->replaceScene(start);
}