summaryrefslogtreecommitdiff
path: root/character_body_2d.gd
diff options
context:
space:
mode:
authorshawn <shawnacarr62@gmail.com>2026-10-08 18:38:25 -0400
committershawn <shawnacarr62@gmail.com>2026-10-08 18:38:25 -0400
commit446ae624c465e1889349adc79724001e20f4964b (patch)
treeed79597472b51c47f44a6be0ebef5d27fb583c38 /character_body_2d.gd
parent684da9c02cdfbc7490ba43d44885e116eb1a9c69 (diff)
everything NEWmain
Diffstat (limited to 'character_body_2d.gd')
-rw-r--r--character_body_2d.gd17
1 files changed, 17 insertions, 0 deletions
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.