Merge pull request #253 from songchengjiang/v3

fix the bug of MoveTo
This commit is contained in:
XiaoYang 2015-03-13 11:42:58 +08:00
commit 7b6b00257d
1 changed files with 4 additions and 2 deletions

View File

@ -1546,8 +1546,9 @@ void Animate3DTest::addSprite3D()
void Animate3DTest::reachEndCallBack()
{
auto s = Director::getInstance()->getWinSize();
_sprite->stopActionByTag(100);
auto inverse = (MoveTo*)_moveAction->reverse();
auto inverse = MoveTo::create(4.f, Vec2(s.width - _sprite->getPositionX(), s.height / 2.f));
inverse->retain();
_moveAction->release();
_moveAction = inverse;
@ -1943,8 +1944,9 @@ void Sprite3DWithOBBPerformanceTest::addNewSpriteWithCoords(Vec2 p)
void Sprite3DWithOBBPerformanceTest::reachEndCallBack()
{
auto s = Director::getInstance()->getWinSize();
_sprite->stopActionByTag(100);
auto inverse = (MoveTo*)_moveAction->reverse();
auto inverse = MoveTo::create(4.f, Vec2(s.width - _sprite->getPositionX(), s.height / 2.f));
inverse->retain();
_moveAction->release();
_moveAction = inverse;