crouch still needs tweaking on the camera but functional, added air dash

This commit is contained in:
derek
2025-06-16 13:51:45 -05:00
parent d5d83c75f7
commit 50d8935b4b
8 changed files with 104 additions and 0 deletions

22
scripts/player_on_foot.gd Normal file
View File

@@ -0,0 +1,22 @@
extends PlayerState
class_name PlayerOnFoot
func Enter():
character.jumps_remaining = character.MAX_JUMPS
func Physics_Update(delta):
if character.is_on_floor():
standard_movement(delta)
else:
Transitioned.emit(self,"in air")
if Input.is_action_just_pressed("crouch"):
if character.is_on_floor():
Transitioned.emit(self,"crouched")
else:
character.velocity.y -= 25
if Input.is_action_just_pressed("jump"):
character.jumps_remaining -= 1
character.velocity.y += character.JUMP_VELOCITY