Magic_Game/core/Action/ActionRotateTo.cpp

20 lines
370 B
C++
Raw Normal View History

2018-04-21 21:24:46 +08:00
#include "..\e2daction.h"
2018-02-27 21:07:43 +08:00
e2d::ActionRotateTo::ActionRotateTo(double duration, double rotation) :
ActionRotateBy(duration, 0)
{
2018-05-08 17:40:36 +08:00
_nEndVal = rotation;
}
e2d::ActionRotateTo * e2d::ActionRotateTo::clone() const
{
2018-05-08 17:40:36 +08:00
return new ActionRotateTo(_fDuration, _nEndVal);
}
void e2d::ActionRotateTo::_init()
{
ActionRotateBy::_init();
2018-05-08 17:40:36 +08:00
_nVariation = _nEndVal - _nBeginVal;
}