add player swing sounds
This commit is contained in:
@@ -3,6 +3,7 @@ extends AnimationTree
|
||||
@export_group("Audio")
|
||||
@export var _hurt_sound: AudioStream
|
||||
@export var _hit_sounds: Array[AudioStream]
|
||||
@export var _swing_sounds: AudioStream
|
||||
|
||||
var _speed: float
|
||||
var _has_input: bool
|
||||
@@ -85,10 +86,12 @@ func _run_to_idle() -> void:
|
||||
|
||||
func _abort_oneshots() -> void:
|
||||
set(&"parameters/hit_oneshot/request", AnimationNodeOneShot.ONE_SHOT_REQUEST_ABORT)
|
||||
set(&"parameters/run->idle_oneshot/request", AnimationNodeOneShot.ONE_SHOT_REQUEST_ABORT)
|
||||
|
||||
|
||||
func _on_attack_attacked() -> void:
|
||||
set(&"parameters/hit_oneshot/request", AnimationNodeOneShot.ONE_SHOT_REQUEST_FIRE)
|
||||
_play_sound(_swing_sounds)
|
||||
|
||||
|
||||
func _on_attack_did_hit() -> void:
|
||||
|
||||
Reference in New Issue
Block a user