2018-05-10 14:03:54 +08:00
|
|
|
#include "..\e2daction.h"
|
2018-09-05 13:33:39 +08:00
|
|
|
#include "..\e2dnode.h"
|
2018-05-10 14:03:54 +08:00
|
|
|
|
2018-07-28 20:06:27 +08:00
|
|
|
e2d::JumpTo::JumpTo(float duration, const Point & pos, float height, int jumps)
|
2018-05-10 14:03:54 +08:00
|
|
|
: JumpBy(duration, Point(), height, jumps)
|
2018-09-04 22:42:34 +08:00
|
|
|
, end_pos_(pos)
|
2018-05-10 14:03:54 +08:00
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
2018-09-04 22:42:34 +08:00
|
|
|
e2d::JumpTo * e2d::JumpTo::Clone() const
|
2018-05-10 14:03:54 +08:00
|
|
|
{
|
2018-09-04 22:42:34 +08:00
|
|
|
return new (e2d::autorelease) JumpTo(duration_, end_pos_, height_, jumps_);
|
2018-05-10 14:03:54 +08:00
|
|
|
}
|
|
|
|
|
|
2018-09-04 22:42:34 +08:00
|
|
|
void e2d::JumpTo::Init()
|
2018-05-10 14:03:54 +08:00
|
|
|
{
|
2018-09-04 22:42:34 +08:00
|
|
|
JumpBy::Init();
|
|
|
|
|
delta_pos_ = end_pos_ - start_pos_;
|
2018-05-10 14:03:54 +08:00
|
|
|
}
|