2018-04-02 23:01:38 +08:00
|
|
|
#include "..\etransition.h"
|
|
|
|
|
#include "..\enode.h"
|
2017-10-21 19:09:31 +08:00
|
|
|
|
2018-02-27 21:07:43 +08:00
|
|
|
e2d::TransitionEmerge::TransitionEmerge(double duration)
|
2018-02-07 16:37:12 +08:00
|
|
|
: Transition(duration)
|
2017-10-21 19:09:31 +08:00
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
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-04-17 01:11:56 +08:00
|
|
|
void e2d::TransitionEmerge::_init(Scene * prev, Scene * next)
|
2017-12-09 15:27:11 +08:00
|
|
|
{
|
2018-04-17 01:11:56 +08:00
|
|
|
Transition::_init(prev, next);
|
|
|
|
|
m_sPrevLayerParam.opacity = 1;
|
|
|
|
|
m_sNextLayerParam.opacity = 0;
|
2017-12-09 15:27:11 +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
|
|
|
}
|