citylimits/addons/simple-state/demo/demo.gd
Tony Bark c980445340 Major clean up and reorganization
- Upgraded to Godot 4
- Just remembered the basic principles are based on a tile editor, and dramatically simplified from there. Derp.
- New state machine and license display add-ons.
- Re-licensed under the GPL because Micropolis' assets aren't under a separate one.
2023-03-14 06:17:27 -04:00

14 lines
310 B
GDScript

extends State
const NEXT_STATE_ACTION = "demo_next_state"
func _enter() -> void:
if InputMap.has_action(NEXT_STATE_ACTION):
return
var input_event := InputEventKey.new()
input_event.keycode = KEY_TAB
InputMap.add_action(NEXT_STATE_ACTION)
InputMap.action_add_event(NEXT_STATE_ACTION, input_event)