2018-05-08 20:03:29 +08:00
|
|
|
#include "..\e2daction.h"
|
2018-05-24 00:58:16 +08:00
|
|
|
#include "..\e2dnode.h"
|
2018-05-08 20:03:29 +08:00
|
|
|
|
|
|
|
|
|
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-05-08 20:03:29 +08:00
|
|
|
{
|
|
|
|
|
_endVal = rotation;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
e2d::RotateTo * e2d::RotateTo::clone() const
|
|
|
|
|
{
|
2018-07-06 12:59:32 +08:00
|
|
|
return new (e2d::autorelease) RotateTo(_duration, _endVal);
|
2018-05-08 20:03:29 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void e2d::RotateTo::_init()
|
|
|
|
|
{
|
|
|
|
|
RotateBy::_init();
|
|
|
|
|
_deltaVal = _endVal - _startVal;
|
|
|
|
|
}
|