2017-10-19 12:48:58 +08:00
|
|
|
#include "..\eactions.h"
|
|
|
|
|
|
|
|
|
|
|
2017-10-21 19:09:31 +08:00
|
|
|
e2d::EActionRotateTo::EActionRotateTo(float duration, float rotation) :
|
2017-10-19 12:48:58 +08:00
|
|
|
EActionRotateBy(duration, 0)
|
|
|
|
|
{
|
2017-10-21 19:09:31 +08:00
|
|
|
m_nEndVal = rotation;
|
2017-10-19 12:48:58 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
e2d::EActionRotateTo * e2d::EActionRotateTo::clone() const
|
|
|
|
|
{
|
2018-01-30 16:45:38 +08:00
|
|
|
return new EActionRotateTo(m_fDuration, m_nEndVal);
|
2017-10-19 12:48:58 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void e2d::EActionRotateTo::_init()
|
|
|
|
|
{
|
|
|
|
|
EActionRotateBy::_init();
|
|
|
|
|
m_nVariation = m_nEndVal - m_nBeginVal;
|
|
|
|
|
}
|