1
나는 corona sdk에서 프로그램의 흐름에 대해 매우 혼란스러워합니다.lua/corona sdk 코드의 흐름에 문제가 발생했습니다.
내가 원하는 것은 전환이 끝나면 플로우가 계속되고, Oncomplete를 사용할 수 있지만이 경우에 사용하는 방법을 모른다는 것입니다.
이 코드가 있습니다
while ban == 2 do
actual = x
desplazar = x
while actual >= 0 do
actual = actual - 4
if inTable(t,actual) then
while inTable(t,actual) and actual >=0 do
actual= actual - 4
end
end
if actual >= 0 then
banaux=1
if inTable(t, desplazar) then
block[desplazar].value=0
block[desplazar]:removeSelf()
for z=1, tablelength(t) do
if t[z] == desplazar then
t[z]=32
end
end
end
transition.to(block[actual], {time=velocity, x=block[desplazar].x, y=block[desplazar].y})
cambiodesp(actual,desplazar)
desplazar = desplazar - 4
end
end
x = x -1
if inTable(t,x) then
else
ban = 1
end
end
전이, 나는이 전환을 완료하지 않은 있지만, 코드가 실행 유지하는 것이되어 있기 때문에 예기치 않은 결과를 많이 얻고을, 내가 뭔가를 만들고 싶어 전환이 완료되면 위의 코드를 실행하지만 oncomplete를 사용할 수 없다고 생각합니다.
는 내가 코드의 흐름이 작동 방법을 이해하고 있지 않다
transition.to(block[actual], {time=velocity, x=block[desplazar].x, y=block[desplazar].y})
이 완료되면 킵가 실행 만들고 싶어, 그래서 당신이 설명 할 수 있기를 바랍니다 그다지