gd,refacto: added state chart addon and namespace cleanup
This commit is contained in:
10
godot_state_charts_examples/ant_hill/pause_controller.gd
Normal file
10
godot_state_charts_examples/ant_hill/pause_controller.gd
Normal file
@ -0,0 +1,10 @@
|
||||
extends Node
|
||||
|
||||
|
||||
func _ready():
|
||||
process_mode = Node.PROCESS_MODE_ALWAYS
|
||||
|
||||
func _input(event):
|
||||
if event is InputEventKey and event.is_pressed() and event.keycode == KEY_SPACE:
|
||||
get_tree().paused = not get_tree().paused
|
||||
print("Paused ", get_tree().paused)
|
Reference in New Issue
Block a user