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)) local sp = cc.Sprite:createWithTexture(layer.spriteTexture, cc.rect(posx, posy, 85, 121))
sp:setScale(scale) 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) layer:addChild(sp)
sp:setPosition(p) sp:setPosition(p)
return sp return sp
@ -1650,7 +1650,7 @@ local function PhysicsTransformTest()
local normal = cc.Sprite:create("Images/YellowSquare.png") local normal = cc.Sprite:create("Images/YellowSquare.png")
normal:setPosition(cc.p(300,100)) normal:setPosition(cc.p(300,100))
normal:setScale(0.25,0.5) 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) normal:getPhysicsBody():setTag(DRAG_BODYS_TAG)
_rootLayer:addChild(normal) _rootLayer:addChild(normal)
@ -1673,8 +1673,7 @@ local function PhysicsTransformTest()
end end
initWithLayer(layer, onEnter) initWithLayer(layer, onEnter)
Helper.titleLabel:setString("Reorder issue #9959") Helper.titleLabel:setString("Physics transform test")
Helper.subtitleLabel:setString("Test Scale9Sprite run scale/move/rotation action in physics scene")
return layer return layer
end end
@ -1703,7 +1702,8 @@ local function PhysicsIssue9959()
end end
initWithLayer(layer, onEnter) 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 return layer
end end