build sfx

This commit is contained in:
Sveske Juice 2024-04-21 03:49:10 +02:00
parent 133bba34fb
commit 681882c381
1 changed files with 7 additions and 0 deletions

View File

@ -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;