Set up a revised player scene with a component based apparoach; shooting

functionality incomplete.
This commit is contained in:
Henry 2026-04-06 01:30:53 +01:00
parent 8d89271074
commit 9b3841775c
13 changed files with 331 additions and 0 deletions

View file

@ -0,0 +1,11 @@
class_name InputComponent extends Node
var move_dir: Vector2 = Vector2.ZERO
var shoot_pressed: bool = false
var shooting: bool = false
func update() -> void:
move_dir = Input.get_vector("left", "right", "up", "down")
shoot_pressed = Input.is_action_just_pressed("shoot")
shooting = Input.is_action_pressed("shoot")