From 446ae624c465e1889349adc79724001e20f4964b Mon Sep 17 00:00:00 2001 From: shawn Date: Thu, 8 Oct 2026 18:38:25 -0400 Subject: everything NEW --- character_body_2d.gd | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 character_body_2d.gd (limited to 'character_body_2d.gd') diff --git a/character_body_2d.gd b/character_body_2d.gd new file mode 100644 index 0000000..62298c0 --- /dev/null +++ b/character_body_2d.gd @@ -0,0 +1,17 @@ +extends CharacterBody2D + +const speed = 100.0 +const JUMP_VELOCITY = -400.0 + +func _physics_process(delta: float) -> void: + var direction := Input.get_vector("move_left", "move_right", "move_up", "move_down") + + # ADD THIS LINE TO DEBUG: + print("Direction: ", direction, " | Velocity: ", velocity) + + velocity = direction * speed + move_and_slide() + + +func _on_animation_player_current_animation_changed(anim_name: StringName) -> void: + pass # Replace with function body. -- cgit v1.3.1