Added a hit sound (ripping fabric)
This commit is contained in:
parent
f566480ede
commit
76b78dca69
3 changed files with 26 additions and 0 deletions
|
@ -6,6 +6,7 @@ signal exploded
|
|||
@export var g = Vector3.DOWN * 5
|
||||
@onready var bulletAuthority = get_multiplayer_authority()
|
||||
var velocity = Vector3.ZERO
|
||||
var audio_stream_player = AudioStreamPlayer.new()
|
||||
|
||||
|
||||
func _ready():
|
||||
|
@ -51,3 +52,9 @@ func take_damage(damager):
|
|||
Global.playerHealth = Global.playerHealth - damage
|
||||
Global.lastPersonToHitMe = damager
|
||||
Global.spawnCotton = true
|
||||
play_audio(load("res://sounds/hit.mp3"))
|
||||
|
||||
func play_audio(audio):
|
||||
audio_stream_player.set_stream(audio)
|
||||
add_child(audio_stream_player)
|
||||
audio_stream_player.play()
|
||||
|
|
BIN
sounds/hit.mp3
Normal file
BIN
sounds/hit.mp3
Normal file
Binary file not shown.
19
sounds/hit.mp3.import
Normal file
19
sounds/hit.mp3.import
Normal file
|
@ -0,0 +1,19 @@
|
|||
[remap]
|
||||
|
||||
importer="mp3"
|
||||
type="AudioStreamMP3"
|
||||
uid="uid://0a3uenjpbmfo"
|
||||
path="res://.godot/imported/hit.mp3-55d05ce70ce1fda9e8d937903cce14b9.mp3str"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://sounds/hit.mp3"
|
||||
dest_files=["res://.godot/imported/hit.mp3-55d05ce70ce1fda9e8d937903cce14b9.mp3str"]
|
||||
|
||||
[params]
|
||||
|
||||
loop=false
|
||||
loop_offset=0
|
||||
bpm=0
|
||||
beat_count=0
|
||||
bar_beats=4
|
Loading…
Reference in a new issue