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-05-10 14:03:54 +08:00
|
|
|
e2d::RotateTo::RotateTo(double duration, double rotation)
|
|
|
|
|
: RotateBy(duration, 0)
|
2018-05-08 20:03:29 +08:00
|
|
|
{
|
|
|
|
|
_endVal = rotation;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
e2d::RotateTo * e2d::RotateTo::clone() const
|
|
|
|
|
{
|
2018-05-19 01:10:37 +08:00
|
|
|
return GC::create<RotateTo>(_duration, _endVal);
|
2018-05-08 20:03:29 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void e2d::RotateTo::_init()
|
|
|
|
|
{
|
|
|
|
|
RotateBy::_init();
|
|
|
|
|
_deltaVal = _endVal - _startVal;
|
|
|
|
|
}
|