Lua-重播按钮?
我正在使用Corona SDK制作一个应用程序。在游戏中,你必须及时触摸所有球体,如果你赢了,就会出现一个你赢的图像。我在“你赢了”的信息下做了一个重播按钮,但是我怎么说他要重新开始整个游戏呢 以下是代码(并非全部):Lua-重播按钮?,lua,coronasdk,Lua,Coronasdk,我正在使用Corona SDK制作一个应用程序。在游戏中,你必须及时触摸所有球体,如果你赢了,就会出现一个你赢的图像。我在“你赢了”的信息下做了一个重播按钮,但是我怎么说他要重新开始整个游戏呢 以下是代码(并非全部): 你可以像这样做一个while循环 while true do if mainGame then --game code elseif done then --buttons if button.restart th
你可以像这样做一个while循环
while true do
if mainGame then
--game code
elseif done then
--buttons
if button.restart then
mainGame = true
end
end
end
while true do
if mainGame then
--game code
elseif done then
--buttons
if button.restart then
mainGame = true
end
end
end