统一缩进为制表符
parent
e885c52f20
commit
9e23f0f9e2
@ -1,12 +1,12 @@
|
||||
extends Node3D
|
||||
|
||||
func _input(event) -> void:
|
||||
if !event.is_action_type():
|
||||
return
|
||||
for action_name in InputMap.get_actions():
|
||||
if event.is_action_pressed(action_name):
|
||||
SignalManager.input_action_pressed.emit(action_name)
|
||||
elif event.is_action_released(action_name):
|
||||
SignalManager.input_action_released.emit(action_name)
|
||||
var input_dir: Vector2 = Input.get_vector("move_left", "move_right", "move_up", "move_down")
|
||||
SignalManager.input_action_move.emit(input_dir)
|
||||
if !event.is_action_type():
|
||||
return
|
||||
for action_name in InputMap.get_actions():
|
||||
if event.is_action_pressed(action_name):
|
||||
SignalManager.input_action_pressed.emit(action_name)
|
||||
elif event.is_action_released(action_name):
|
||||
SignalManager.input_action_released.emit(action_name)
|
||||
var input_dir: Vector2 = Input.get_vector("move_left", "move_right", "move_up", "move_down")
|
||||
SignalManager.input_action_move.emit(input_dir)
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
extends Control
|
||||
|
||||
func input_action_pressed(key: String):
|
||||
match key:
|
||||
"menu":
|
||||
Global.ui_mgr.pause_close("menu")
|
||||
Global.ui_mgr.open("hud")
|
||||
match key:
|
||||
"menu":
|
||||
Global.ui_mgr.pause_close("menu")
|
||||
Global.ui_mgr.open("hud")
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
extends Label
|
||||
|
||||
func _process(delta):
|
||||
set_text("%d FPS" % Engine.get_frames_per_second())
|
||||
set_text("%d FPS" % Engine.get_frames_per_second())
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
extends Control
|
||||
|
||||
func input_action_pressed(key: String):
|
||||
match key:
|
||||
"status":
|
||||
Global.ui_mgr.pause_close("status")
|
||||
Global.ui_mgr.open("hud")
|
||||
match key:
|
||||
"status":
|
||||
Global.ui_mgr.pause_close("status")
|
||||
Global.ui_mgr.open("hud")
|
||||
|
||||
Loading…
Reference in New Issue