Commit 757fbac3 authored by Leandro Motta Barros's avatar Leandro Motta Barros

PLay sound when drilling

parent f446c604
[gd_resource type="AudioBusLayout" load_steps=2 format=2]
[sub_resource type="AudioEffectStereoEnhance" id=1]
resource_name = "StereoEnhance"
pan_pullout = 4.0
[resource]
bus/0/effect/0/effect = SubResource( 1 )
bus/0/effect/0/enabled = true
......@@ -58,6 +58,7 @@ config/icon="res://icon.png"
[autoload]
Globals="*res://scripts/Globals.gd"
SoundManager="*res://scenes/SoundManager.tscn"
[display]
......
......@@ -14,6 +14,7 @@ func _init():
func useImplementation() -> void:
SoundManager.drill()
useToolToFix(fixPower)
......
......@@ -32,7 +32,7 @@ tracks/1/keys = {
"values": [ 0.0, 5.0, -3.0, 4.0, -3.0, 0.0 ]
}
[node name="PowerTool" index="0" instance=ExtResource( 1 )]
[node name="PowerTool" instance=ExtResource( 1 )]
script = ExtResource( 2 )
[node name="AnimationPlayer" parent="." index="0"]
......
extends Node2D
func drill():
$Drill.play()
[gd_scene load_steps=3 format=2]
[ext_resource path="res://scenes/SoundManager.gd" type="Script" id=1]
[ext_resource path="res://sfx/drill.wav" type="AudioStream" id=2]
[node name="SoundManager" type="Node2D"]
script = ExtResource( 1 )
[node name="Drill" type="AudioStreamPlayer" parent="."]
stream = ExtResource( 2 )
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment