游戏动画无法正常工作 - corona SDK。

....我的游戏出现了一些奇怪的问题。在我的游戏中有两个动画序列:Hop 和 Drop。

local sequenceData = {
    {name="hop", start=1, count=1, time=300},
    {name="drop", start=2, count=1, time=300}
}

它们是从一个名为 'MovePlayer() ' 的函数中调用的。

function movePlayer(event)
   bird.bodyType = "dynamic"
   gameStarted = true
   if event.phase == "began" then
        bird:setLinearVelocity(0, -flapForce)
        playSFX(sndJump)
        bird:setSequence("hop")
        print("Hop")
   elseif event.phase == "ended" then
        bird:setSequence("drop")
        print("Drop")
   end
   return true
end

以前这些都是很好的,但现在当我点击屏幕并期望播放 Hop 序列时,我看不到任何动画。有什么想法是错的吗?这个游戏是在四月份创建的。

干杯

点赞
用户3974215
用户3974215

在更改序列后,精灵将不会自动播放 - 调用object:play()来在新序列上继续播放。

Corona Docs

2015-12-16 09:28:12