Magic_Game/core/Action/ActionMoveTo.cpp

19 lines
342 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::ActionMoveTo::ActionMoveTo(double duration, Point pos) :
ActionMoveBy(duration, Vector())
{
2018-05-08 17:40:36 +08:00
_EndPos = pos;
}
e2d::ActionMoveTo * e2d::ActionMoveTo::clone() const
{
2018-05-08 17:40:36 +08:00
return new ActionMoveTo(_fDuration, _EndPos);
}
void e2d::ActionMoveTo::_init()
{
ActionMoveBy::_init();
2018-05-08 17:40:36 +08:00
_MoveVec = _EndPos - _BeginPos;
}