From 681882c3817d0d12909f02d76e50f242609945eb Mon Sep 17 00:00:00 2001 From: Sveske Juice Date: Sun, 21 Apr 2024 03:49:10 +0200 Subject: [PATCH] build sfx --- Assets/Scripts/PlacementSystem/PlacementManager.cs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Assets/Scripts/PlacementSystem/PlacementManager.cs b/Assets/Scripts/PlacementSystem/PlacementManager.cs index 2ebbee2..b7e678e 100644 --- a/Assets/Scripts/PlacementSystem/PlacementManager.cs +++ b/Assets/Scripts/PlacementSystem/PlacementManager.cs @@ -65,14 +65,21 @@ public class TowerPlacementManager : MonoBehaviour private void OnEnable() { + OnTowerPlaced += PlayPlaceSfx; MoneyManager.OnShopSelected += OnShopSelected; } private void OnDisable() { + OnTowerPlaced -= PlayPlaceSfx; MoneyManager.OnShopSelected -= OnShopSelected; } + private void PlayPlaceSfx(TowerInfo info) + { + AudioManager.PlaySound("BuildTower", Vector3.zero); + } + private void OnShopSelected(TowerInfo info) { SelectedTowerInfo = info;