Merge pull request #13945 from WenhaiLin/v3-physics-testcase-fix

[ci skip]Lua-tests:Fixed physical test cases.
This commit is contained in:
pandamicro 2015-09-19 00:05:26 +08:00
commit 3fc1349561
1 changed files with 7 additions and 7 deletions

View File

@ -53,7 +53,7 @@ local function addGrossiniAtPosition(layer, p, scale)
local sp = cc.Sprite:createWithTexture(layer.spriteTexture, cc.rect(posx, posy, 85, 121))
sp:setScale(scale)
sp:setPhysicsBody(cc.PhysicsBody:createBox(cc.size(48.0*scale, 108.0*scale)))
sp:setPhysicsBody(cc.PhysicsBody:createBox(cc.size(48.0, 108.0)))
layer:addChild(sp)
sp:setPosition(p)
return sp
@ -1650,7 +1650,7 @@ local function PhysicsTransformTest()
local normal = cc.Sprite:create("Images/YellowSquare.png")
normal:setPosition(cc.p(300,100))
normal:setScale(0.25,0.5)
normal:setPhysicsBody(cc.PhysicsBody:createBox(normal:getContentSize()),cc.PhysicsMaterial(0.1,1.0,0.0))
normal:setPhysicsBody(cc.PhysicsBody:createBox(normal:getContentSize(),cc.PhysicsMaterial(0.1,1.0,0.0)))
normal:getPhysicsBody():setTag(DRAG_BODYS_TAG)
_rootLayer:addChild(normal)
@ -1673,8 +1673,7 @@ local function PhysicsTransformTest()
end
initWithLayer(layer, onEnter)
Helper.titleLabel:setString("Reorder issue #9959")
Helper.subtitleLabel:setString("Test Scale9Sprite run scale/move/rotation action in physics scene")
Helper.titleLabel:setString("Physics transform test")
return layer
end
@ -1703,7 +1702,8 @@ local function PhysicsIssue9959()
end
initWithLayer(layer, onEnter)
Helper.titleLabel:setString("Physics transform test")
Helper.titleLabel:setString("Reorder issue #9959")
Helper.subtitleLabel:setString("Test Scale9Sprite run scale/move/rotation action in physics scene")
return layer
end