2018-04-21 21:24:46 +08:00
|
|
|
#include "..\e2dtransition.h"
|
|
|
|
|
#include "..\e2dnode.h"
|
2017-10-21 19:09:31 +08:00
|
|
|
|
2018-02-27 21:07:43 +08:00
|
|
|
e2d::TransitionEmerge::TransitionEmerge(double duration)
|
2018-04-30 16:49:44 +08:00
|
|
|
: TransitionBase(duration)
|
2017-10-21 19:09:31 +08:00
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
2018-04-17 11:41:33 +08:00
|
|
|
void e2d::TransitionEmerge::_init(Scene * prev, Scene * next)
|
|
|
|
|
{
|
2018-04-30 16:49:44 +08:00
|
|
|
TransitionBase::_init(prev, next);
|
2018-04-17 11:41:33 +08:00
|
|
|
m_sPrevLayerParam.opacity = 1;
|
|
|
|
|
m_sNextLayerParam.opacity = 0;
|
|
|
|
|
}
|
|
|
|
|
|
2018-04-17 01:11:56 +08:00
|
|
|
void e2d::TransitionEmerge::_updateCustom()
|
2017-10-21 19:09:31 +08:00
|
|
|
{
|
2018-04-17 01:11:56 +08:00
|
|
|
m_sPrevLayerParam.opacity = float(1 - m_fRateOfProgress);
|
|
|
|
|
m_sNextLayerParam.opacity = float(m_fRateOfProgress);
|
2017-10-21 19:09:31 +08:00
|
|
|
|
2018-01-30 16:45:38 +08:00
|
|
|
if (m_fRateOfProgress >= 1)
|
|
|
|
|
{
|
|
|
|
|
this->_stop();
|
2017-12-09 15:27:11 +08:00
|
|
|
}
|
|
|
|
|
}
|
2017-10-21 19:09:31 +08:00
|
|
|
|
2018-02-07 16:37:12 +08:00
|
|
|
void e2d::TransitionEmerge::_reset()
|
2017-12-09 15:27:11 +08:00
|
|
|
{
|
2017-10-21 19:09:31 +08:00
|
|
|
}
|