Magic_Game/core/actions/RotateTo.cpp

21 lines
361 B
C++
Raw Normal View History

#include "..\e2daction.h"
2018-09-06 23:26:32 +08:00
#include "..\e2dobject.h"
2018-07-28 20:06:27 +08:00
e2d::RotateTo::RotateTo(float duration, float rotation)
2018-05-10 14:03:54 +08:00
: RotateBy(duration, 0)
{
2018-09-04 22:42:34 +08:00
end_val_ = rotation;
}
2018-09-04 22:42:34 +08:00
e2d::RotateTo * e2d::RotateTo::Clone() const
{
2018-09-04 22:42:34 +08:00
return new (e2d::autorelease) RotateTo(duration_, end_val_);
}
2018-09-04 22:42:34 +08:00
void e2d::RotateTo::Init()
{
2018-09-04 22:42:34 +08:00
RotateBy::Init();
delta_val_ = end_val_ - start_val_;
}