State machine rework

This commit is contained in:
Rendo 2025-12-09 22:34:17 +05:00
commit 87919ed890
25 changed files with 102 additions and 76 deletions

View file

@ -13,11 +13,11 @@ extends State
@export var crouch_time: float = 0.1
@export var weapon_system: WeaponSystem
func enter() -> void:
func _enter() -> void:
animation_player.play("crouch",-1,1/crouch_time)
player_input.crouch_end.connect(try_end_crouch)
func exit() -> void:
func _exit() -> void:
animation_player.play("crouch",-1,-1/crouch_time,true)
player_input.crouch_end.disconnect(try_end_crouch)