remove match state from player
This commit is contained in:
parent
5b41872c0f
commit
c284cb4796
1 changed files with 0 additions and 13 deletions
|
|
@ -13,16 +13,3 @@ func get_movement_vector() -> Vector2:
|
|||
var x_mov: float = Input.get_action_strength('move_right') - Input.get_action_strength('move_left')
|
||||
var y_mov: float = Input.get_action_strength('move_down') - Input.get_action_strength('move_up')
|
||||
return Vector2(x_mov, y_mov)
|
||||
|
||||
|
||||
func match_state(exclude: Array[StringName] = []) -> StringName:
|
||||
var movement_vector: Vector2 = get_movement_vector()
|
||||
|
||||
if movement_vector.length() > DEADZONE:
|
||||
if PlayerState.WALKING in exclude: return ""
|
||||
return PlayerState.WALKING
|
||||
elif movement_vector.length() < DEADZONE:
|
||||
if PlayerState.IDLE in exclude: return ""
|
||||
return PlayerState.IDLE
|
||||
|
||||
return ""
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue