21 lines
452 B
GDScript
21 lines
452 B
GDScript
extends PlayerState
|
|
class_name PlayerOnFoot
|
|
|
|
|
|
func Enter():
|
|
character.jumps_remaining = character.MAX_JUMPS
|
|
if character.land_sound: #tweak to get around weird loading in error
|
|
character.land_sound.play()
|
|
|
|
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"):
|
|
Transitioned.emit(self,"crouched")
|
|
|
|
standard_jump()
|
|
ledge_grab()
|