mirror of https://github.com/axmolengine/axmol.git
Merge pull request #9900 from samuele3hu/v3_4_fix_bug
[ci skip]Fix some lua-tests bugs
This commit is contained in:
commit
4939a25593
|
@ -77,9 +77,9 @@ function BillBoardTest:init()
|
|||
cameraDir = cc.vec3normalize(cameraDir)
|
||||
cameraDir.y = 0
|
||||
transformMat = self._camera:getNodeToWorldTransform()
|
||||
cameraRightDir.x = -transformMat[1]
|
||||
cameraRightDir.y = -transformMat[2]
|
||||
cameraRightDir.z = -transformMat[3]
|
||||
cameraRightDir.x = transformMat[1]
|
||||
cameraRightDir.y = transformMat[2]
|
||||
cameraRightDir.z = transformMat[3]
|
||||
cameraRightDir = cc.vec3normalize(cameraRightDir)
|
||||
cameraRightDir.y=0
|
||||
|
||||
|
|
|
@ -243,9 +243,9 @@ function TestChangePlaySection:onEnter()
|
|||
|
||||
local function onTouchesEnded(touches, event)
|
||||
if action:getStartFrame() == 0 then
|
||||
action:gotoFrameAndPlay(70, action:getDuration(), true)
|
||||
action:gotoFrameAndPlay(41, 81, true)
|
||||
else
|
||||
action:gotoFrameAndPlay(0, 60, true)
|
||||
action:gotoFrameAndPlay(0, 40, true)
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -1246,7 +1246,7 @@ local function PhysicsPositionRotationTest()
|
|||
local leftBall = cc.Sprite:create("Images/ball.png");
|
||||
leftBall:setPosition(-30, 0);
|
||||
leftBall:setScale(2);
|
||||
leftBall:setPhysicsBody(cc.PhysicsBody:createCircle(leftBall:getContentSize().width/4));
|
||||
leftBall:setPhysicsBody(cc.PhysicsBody:createCircle(leftBall:getContentSize().width));
|
||||
leftBall:getPhysicsBody():setTag(DRAG_BODYS_TAG);
|
||||
parent:addChild(leftBall);
|
||||
|
||||
|
|
|
@ -93,7 +93,8 @@ local function VideoPlayerTest()
|
|||
------------------------------------------------------------
|
||||
local function menuResourceVideoCallback(tag, sender)
|
||||
if nil ~= videoPlayer then
|
||||
videoPlayer:setFileName("res/cocosvideo.mp4")
|
||||
local videoFullPath = cc.FileUtils:getInstance():fullPathForFilename("cocosvideo.mp4")
|
||||
videoPlayer:setFileName(videoFullPath)
|
||||
videoPlayer:play()
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue