----------------------------------------------
ui.lua <<<<<
Icarus = 0
function UI.Event:OnUpdate(time)
UI.Signal(1)
end
function UI.Event:OnSignal(signal)
Icarus = 0
end
function UI.Event:OnIn/put(inp/uts)
if inp/uts[UI.KEY.SPACE] then
if Icarus >= 0 then
Icarus = Icarus + 1
if Icarus >= 40 then
UI.Signal(2)
Icarus = - 1
end
end
end
end
----------------------------------------------
----------------------------------------------
game.lua <<<<<<<
function Game.Rule:OnPlayerSignal(player, signal)
if signal == 1 then
if player.velocity.z == 0 then
player:Signal(1)
end
end
if signal == 2 then
player.velocity = {x=player.velocity.x*1.5, y=player.velocity.y*1.5, z=200}
end
end
----------------------------------------------
i n p u t 에 있는 / 제거
추천 :
2