1
0
Fork 0

add reset button

This commit is contained in:
Manu 2021-04-26 01:44:38 +02:00 committed by Arthur
parent 62056c5d2c
commit 6e75796cd3
2 changed files with 9 additions and 0 deletions

View File

@ -60,6 +60,9 @@ func _process(delta):
if Engine.editor_hint:
return
if Input.is_action_pressed("reset"):
get_tree().reload_current_scene()
if (last_move_time + rest) * 1000 < OS.get_ticks_msec():
for movement in movements:
if Input.is_action_pressed(movement.action):

View File

@ -62,6 +62,12 @@ whoosh={
, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":0,"button_index":1,"pressure":0.0,"pressed":false,"script":null)
]
}
reset={
"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,"unicode":0,"echo":false,"script":null)
, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":0,"button_index":3,"pressure":0.0,"pressed":false,"script":null)
]
}
[physics]