do not use MoveTo::reserse

This commit is contained in:
yangxiao 2015-03-13 14:10:51 +08:00
parent 7b6b00257d
commit 81bf776d09
1 changed files with 4 additions and 2 deletions

View File

@ -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