gd: added input addon

This commit is contained in:
2025-05-27 19:20:46 +02:00
parent d8a1604af9
commit c8d8c7ec25
683 changed files with 21608 additions and 2 deletions

View File

@ -0,0 +1,12 @@
## This is the player script. Note how we can use the same script for both
## players, by just injecting different actions into them. No needs to check
## which player input we should consume.
extends Node2D
@export var speed:float = 150
@export var move_action:GUIDEAction
func _process(delta:float) -> void:
position += move_action.value_axis_2d.normalized() * speed * delta