BulletFlyBySoundPlayer scene

remotes/1705382094874458415/tmp_refs/heads/godot4-port
unfa 2020-09-26 01:01:43 +02:00
parent 176786ecad
commit 9efb1baa18
2 changed files with 34 additions and 0 deletions

View File

@ -0,0 +1,20 @@
extends Spatial
# Declare member variables here. Examples:
# var a = 2
# var b = "text"
# Called when the node enters the scene tree for the first time.
func _ready():
pass # Replace with function body.
# Called every frame. 'delta' is the elapsed time since the previous frame.
#func _process(delta):
# pass
func _on_AudioStreamPlayer3D_finished():
queue_free()

View File

@ -0,0 +1,14 @@
[gd_scene load_steps=3 format=2]
[ext_resource path="res://Audio/SoundPlayer.tscn" type="PackedScene" id=1]
[ext_resource path="res://Audio/BulletFlyBySoundPlayer.gd" type="Script" id=2]
[node name="BulletFlyBySoundPlayer" type="Spatial"]
script = ExtResource( 2 )
[node name="SoundPlayer" parent="." instance=ExtResource( 1 )]
SoundClip = "res://Assets/SFX/Weapons-BulletFlyBy-01.wav"
AutoPlay = true
[connection signal="finished" from="SoundPlayer/AudioStreamPlayer3D" to="." method="_on_AudioStreamPlayer3D_finished"]
[editable path="SoundPlayer"]