diff --git a/player/onhand/PeaShooter.gd b/player/onhand/PeaShooter.gd index 3c42949..e09b1d4 100644 --- a/player/onhand/PeaShooter.gd +++ b/player/onhand/PeaShooter.gd @@ -6,7 +6,7 @@ var last_fired := 0 var remaining := 10 @onready var ray = $RayCast3D -@onready var audio_player := $AudioStreamPlayer3D +@onready var audio_player: AudioStreamPlayer = $ShootSound # FIXME: use singleton class here as well @onready var croptiles_container: Node3D = get_tree().root.find_child("CropTiles", true, false) var croptile = preload("res://island/CropTile.tscn") diff --git a/player/onhand/PeaShooter.tscn b/player/onhand/PeaShooter.tscn index c7ad0c8..d6d64f3 100644 --- a/player/onhand/PeaShooter.tscn +++ b/player/onhand/PeaShooter.tscn @@ -17,9 +17,8 @@ collide_with_areas = true transform = Transform3D(-0.5, 0, -7.54979e-08, 0, 0.5, 0, 7.54979e-08, 0, -0.5, 0.6, -0.8, 0.5) visible = false -[node name="AudioStreamPlayer3D" type="AudioStreamPlayer3D" parent="."] +[node name="ShootSound" type="AudioStreamPlayer" parent="."] stream = ExtResource("4_uhlty") -volume_db = -7.517 max_polyphony = 10 [node name="model" parent="." instance=ExtResource("2_ra8vl")]