SachinKS 于 2013.07.08 13:20 提问

corona sdk 移动对象问题

``````//transition back
local function goBack( )
transition.to ( wall2, { time = 10000, x = 100, y = 310, onComplete = startTransition})
transition.to ( wall, { time = 10000, x = 700, y = 200, onComplete = startTransition})
transition.to (gate_a, { time = 10000, x = 100, y = 255, onComplete = startTransition})
transition.to ( stargate_a, { time = 10000, x = 100, y = 255, onComplete = startTransition})
end
//transition start
function startTransition( )
transition.to ( wall2, { time = 10000, x = 700, y = 310, onComplete = goBack})
transition.to ( wall, { time = 10000, x = 100, y = 200, onComplete = goBack})
transition.to ( gate_a, { time = 10000, x = 700, y = 255, onComplete = goBack})
transition.to ( stargate_a, { time =10000, x = 700, y = 255, onComplete = goBack})
end
startTransition()
``````

1个回答

loFataMer   2013.07.08 14:45

``````//transition back
local function goBack( )
transition.to ( wall2, { time = 10000, x = 100, y = 310})
transition.to ( wall, { time = 10000, x = 700, y = 200})
transition.to (gate_a, { time = 10000, x = 100, y = 255})
transition.to ( stargate_a, { time = 10000, x = 100, y = 255, onComplete =   startTransition})
end
//transition start
function startTransition( )
transition.to ( wall2, { time = 10000, x = 700, y = 310})
transition.to ( wall, { time = 10000, x = 100, y = 200})
transition.to ( gate_a, { time = 10000, x = 700, y = 255})
transition.to ( stargate_a, { time =10000, x = 700, y = 255, onComplete = goBack})
end
startTransition()
``````

Lua 学习笔记四 CoronaSDK使用

Corona SDK 游戏开发引擎介绍

Corona SDK开发的app案例

Corona SDK的优与劣

Corona的工程配置

Corona图形特效-着色和渐变

Corona学习指南之事件与监听器