From 81bf776d090e7ffd5c349cc07ce501e4f016051c Mon Sep 17 00:00:00 2001 From: yangxiao Date: Fri, 13 Mar 2015 14:10:51 +0800 Subject: [PATCH] do not use MoveTo::reserse --- tests/lua-tests/src/Sprite3DTest/Sprite3DTest.lua | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/lua-tests/src/Sprite3DTest/Sprite3DTest.lua b/tests/lua-tests/src/Sprite3DTest/Sprite3DTest.lua index 6807e64103..87916699d8 100644 --- a/tests/lua-tests/src/Sprite3DTest/Sprite3DTest.lua +++ b/tests/lua-tests/src/Sprite3DTest/Sprite3DTest.lua @@ -326,8 +326,9 @@ function Animate3DTest:addSprite3D() self._moveAction:retain() local function reachEndCallBack() + local winSize = cc.Director:getInstance():getWinSize() self._sprite:stopActionByTag(100) - local inverse = self._moveAction:reverse() + local inverse = cc.MoveTo:create(4.0, cc.p(winSize.width - self._sprite:getPositionX(), winSize.height / 2.0)) inverse:retain() self._moveAction:release() self._moveAction = inverse @@ -840,8 +841,9 @@ function Sprite3DWithOBBPerfromanceTest:addNewSpriteWithCoords(vec2) self._moveAction = cc.MoveTo:create(4.0, cc.p(s.width / 5.0, s.height / 2.0)) self._moveAction:retain() local function reachEndCallBack() + local s = cc.Director:getInstance():getWinSize() self._sprite:stopActionByTag(100) - local inverse = self._moveAction:reverse() + local inverse = cc.MoveTo:create(4.0, cc.p(s.width - self._sprite:getPositionX(), s.height / 2.0)) inverse:retain() self._moveAction:release() self._moveAction = inverse