전략게시판

전략게시판 [스튜디오]
루아로 만든 이카루스
2020.04.20 21:27 조회 : 946
Lv. 40익스트림버니합 CosyClimbing 작성자 게시물 더보기
----------------------------------------------

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
댓글을 남기시려면 로그인 해주세요
댓글 : 2
  • ㄷㄷ Lv. 2150010012 2020.04.21
  • ㅅㅅㅅㅅㅅ Lv. 258토게피 2020.04.21