73 lines
1.3 KiB
C++
73 lines
1.3 KiB
C++
|
|
#include "TipNode.h"
|
||
|
|
|
||
|
|
TipNode::TipNode()
|
||
|
|
{
|
||
|
|
m_IsRunning = false;
|
||
|
|
}
|
||
|
|
|
||
|
|
TipNode::~TipNode()
|
||
|
|
{
|
||
|
|
}
|
||
|
|
|
||
|
|
bool TipNode::init()
|
||
|
|
{
|
||
|
|
if (!Node::init())
|
||
|
|
{
|
||
|
|
return false;
|
||
|
|
};
|
||
|
|
|
||
|
|
return true;
|
||
|
|
}
|
||
|
|
|
||
|
|
void TipNode::onEnter()
|
||
|
|
{
|
||
|
|
Node::onEnter();
|
||
|
|
}
|
||
|
|
|
||
|
|
void TipNode::onEnterTransitionDidFinish()
|
||
|
|
{
|
||
|
|
Node::onEnterTransitionDidFinish();
|
||
|
|
}
|
||
|
|
|
||
|
|
void TipNode::onExit()
|
||
|
|
{
|
||
|
|
Node::onExit();
|
||
|
|
}
|
||
|
|
|
||
|
|
void TipNode::popScene()
|
||
|
|
{
|
||
|
|
//if (m_IsRunning == false)
|
||
|
|
//{
|
||
|
|
// CallFunc *func = CallFunc::create([this]{
|
||
|
|
// m_IsRunning = false;
|
||
|
|
// this->removeFromParentAndCleanup(true);
|
||
|
|
// });
|
||
|
|
|
||
|
|
// float height = Director::getInstance()->getWinSize().height;
|
||
|
|
// auto run = EaseExponentialOut::create(MoveTo::create(0.6f, Vec2(.0, height)));
|
||
|
|
// this->runAction(Sequence::createWithTwoActions(run, func));
|
||
|
|
|
||
|
|
// m_IsRunning = true;
|
||
|
|
//}
|
||
|
|
|
||
|
|
this->removeFromParentAndCleanup(true);
|
||
|
|
}
|
||
|
|
|
||
|
|
void TipNode::pushScene()
|
||
|
|
{
|
||
|
|
//if (m_IsRunning == false)
|
||
|
|
//{
|
||
|
|
// float height = Director::getInstance()->getWinSize().height;
|
||
|
|
// this->setPosition(Vec2(0, height));
|
||
|
|
|
||
|
|
// CallFunc *func = CallFunc::create([this]{
|
||
|
|
// m_IsRunning = false;
|
||
|
|
// });
|
||
|
|
|
||
|
|
// this->setVisible(true);
|
||
|
|
// auto run = EaseExponentialOut::create(MoveTo::create(0.6f, Vec2(.0, .0)));
|
||
|
|
// this->runAction(Sequence::createWithTwoActions(run, func));
|
||
|
|
|
||
|
|
// m_IsRunning = true;
|
||
|
|
//}
|
||
|
|
}
|