Magic_Game/core/Transition/TransitionEmerge.cpp

30 lines
561 B
C++
Raw Normal View History

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)
: Transition(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)
{
Transition::_init(prev, next);
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-10-21 19:09:31 +08:00
void e2d::TransitionEmerge::_reset()
{
2017-10-21 19:09:31 +08:00
}