summaryrefslogtreecommitdiffstats
path: root/player.gd
diff options
context:
space:
mode:
authorJan Tuomi <jan@jantuomi.fi>2025-11-14 11:57:22 +0200
committerJan Tuomi <jan@jantuomi.fi>2025-11-14 11:57:36 +0200
commit3c306f183a2290b076ff0be01d4b1dc1428bffea (patch)
tree246c4f08035d4ea1019a92499b88ed0b61f81827 /player.gd
parentc6080b5666d4f961a11b2b420fecb581da69528e (diff)
Add initial level system, main menu
Diffstat (limited to 'player.gd')
-rw-r--r--player.gd3
1 files changed, 2 insertions, 1 deletions
diff --git a/player.gd b/player.gd
index defd9d8..f2127ac 100644
--- a/player.gd
+++ b/player.gd
@@ -1,3 +1,4 @@
+class_name Player
extends CharacterBody2D
@export var speed: float
@@ -37,7 +38,7 @@ func _physics_process(delta: float):
coyote += 1
var can_jump = coyote < coyote_max
- if Input.is_action_just_pressed("jump") and can_jump:
+ if Input.is_action_pressed("jump") and can_jump:
velocity.y = -jump_strength
# Force coyote time to expire to forbid double jumps
coyote = coyote_max