0

我想知道是否有可能在过渡期间获得精灵 x 和 y 坐标。在 lua 中使用 Corona SDK 到动画?如果是这样,我将如何获得它?

4

1 回答 1

1

只需enterFrame在运行时使用侦听器检查它或使用timer连续触发的。

定时器方法:

local function checkPos_withTimer()
   print(yourObject.x)
   print(yourObject.y)
end
timer.performWithDelay(1,withTimer,-1)

或者

使用 enterFrame 检查:

local function checkin_frames()
   print(yourObject.x)
   print(yourObject.y)
end
Runtime:addEventListener("enterFrame",checkin_frames)

继续编码............ :)

于 2013-05-13T05:37:57.450 回答