本帖最后由 金芒芒 于 2022-10-18 14:47 编辑
我不想循环进入地图我就想执行一遍 q w a s d s的快捷 可我试过了没用
module Input #CASZ Tr = method("trigger?") def self.trigger?(input) if $scene.is_a?(Scene_Map) if input == Input::Q and $game_switches[27] $game_switches[27] = false return true end if input == Input::W and $game_switches[29] $game_switches[29] = false return true end if input == Input::A and $game_switches[30] $game_switches[30] = false return true end end if input == Input::D and $game_switches[31] $game_switches[31] = false return true end end if input == Input::S and $game_switches[32] $game_switches[32] = false return true end end Tr.call(input) end Pr = method("press?") def self.press?(input) if $scene.is_a?(Scene_Map) if input == Input::X and $game_switches[28] #A $game_switches[28] = false return true end end Pr.call(input) end end
module Input #CASZ
Tr = method("trigger?")
def self.trigger?(input)
if $scene.is_a?(Scene_Map)
if input == Input::Q and $game_switches[27]
$game_switches[27] = false
return true
end
if input == Input::W and $game_switches[29]
$game_switches[29] = false
return true
end
if input == Input::A and $game_switches[30]
$game_switches[30] = false
return true
end
end
if input == Input::D and $game_switches[31]
$game_switches[31] = false
return true
end
end
if input == Input::S and $game_switches[32]
$game_switches[32] = false
return true
end
end
Tr.call(input)
end
Pr = method("press?")
def self.press?(input)
if $scene.is_a?(Scene_Map)
if input == Input::X and $game_switches[28] #A
$game_switches[28] = false
return true
end
end
Pr.call(input)
end
end
|