Magic_Game/core/Action/RotateTo.cpp

20 lines
330 B
C++
Raw Normal View History

#include "..\e2daction.h"
2018-05-10 14:03:54 +08:00
e2d::RotateTo::RotateTo(double duration, double rotation)
: RotateBy(duration, 0)
{
_endVal = rotation;
}
e2d::RotateTo * e2d::RotateTo::clone() const
{
2018-05-10 14:03:54 +08:00
return new (std::nothrow) RotateTo(_duration, _endVal);
}
void e2d::RotateTo::_init()
{
RotateBy::_init();
_deltaVal = _endVal - _startVal;
}