Refactor rhythm action architecture
This commit is contained in:
@@ -131,3 +131,13 @@ func start_directional_air_attack(direction: Vector2) -> void:
|
||||
attack_time_left = air_attack_duration
|
||||
attack_lunge_time_left = air_attack_lunge_duration
|
||||
velocity = Vector2(attack_x * air_attack_lunge_speed, 0.0)
|
||||
|
||||
|
||||
func begin_attack_motion(duration: float, next_velocity: Vector2) -> void:
|
||||
attack_lunge_time_left = maxf(0.0, duration)
|
||||
velocity = next_velocity
|
||||
|
||||
|
||||
func stop_attack_motion() -> void:
|
||||
attack_lunge_time_left = 0.0
|
||||
velocity = Vector2.ZERO
|
||||
|
||||
Reference in New Issue
Block a user