make restart a regular feature outside of debug
This commit is contained in:
parent
126f170489
commit
e744920cb9
3 changed files with 4 additions and 4 deletions
3
game.gd
3
game.gd
|
@ -166,6 +166,9 @@ func play_music(song):
|
||||||
|
|
||||||
func _physics_process(delta):
|
func _physics_process(delta):
|
||||||
if Debug.entry == false:
|
if Debug.entry == false:
|
||||||
|
# restart level
|
||||||
|
if Input.is_action_just_pressed("restart"):
|
||||||
|
call_deferred("restart_level")
|
||||||
#CRT FILTER
|
#CRT FILTER
|
||||||
if Input.is_action_just_pressed("crt"):
|
if Input.is_action_just_pressed("crt"):
|
||||||
viewport_container.material.set_shader_param("enabled",!viewport_container.material.get_shader_param("enabled"))
|
viewport_container.material.set_shader_param("enabled",!viewport_container.material.get_shader_param("enabled"))
|
||||||
|
|
|
@ -108,7 +108,7 @@ jump={
|
||||||
, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"button_index":0,"pressure":0.0,"pressed":false,"script":null)
|
, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"button_index":0,"pressure":0.0,"pressed":false,"script":null)
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
debug_restart={
|
restart={
|
||||||
"deadzone": 0.5,
|
"deadzone": 0.5,
|
||||||
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":82,"physical_scancode":0,"unicode":0,"echo":false,"script":null)
|
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":82,"physical_scancode":0,"unicode":0,"echo":false,"script":null)
|
||||||
]
|
]
|
||||||
|
|
|
@ -39,9 +39,6 @@ func _physics_process(delta):
|
||||||
#Show console
|
#Show console
|
||||||
if Input.is_action_just_pressed("debug_show"):
|
if Input.is_action_just_pressed("debug_show"):
|
||||||
console.visible = !console.visible
|
console.visible = !console.visible
|
||||||
#Restart scene
|
|
||||||
if Input.is_action_just_pressed("debug_restart"):
|
|
||||||
Game.call_deferred("restart_level")
|
|
||||||
#Move player to mouse
|
#Move player to mouse
|
||||||
if Input.is_action_pressed("debug_move_player"):
|
if Input.is_action_pressed("debug_move_player"):
|
||||||
Game.get_map().get_node("Player").position = get_viewport().get_mouse_position()
|
Game.get_map().get_node("Player").position = get_viewport().get_mouse_position()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue