cool sounds
This commit is contained in:
parent
da4f729681
commit
51b7d58ada
12 changed files with 3152 additions and 157 deletions
|
|
@ -15,6 +15,7 @@ namespace TD.Combat
|
|||
public class TowerBuiltSound : MonoBehaviour
|
||||
{
|
||||
[SerializeField] private SoundConfig builtSound;
|
||||
[SerializeField] private float delaySeconds = 0.3f;
|
||||
|
||||
private TowerInstance towerInstance;
|
||||
|
||||
|
|
@ -34,6 +35,11 @@ namespace TD.Combat
|
|||
}
|
||||
|
||||
private void HandleBuilt()
|
||||
{
|
||||
Invoke(nameof(PlayBuiltSound), delaySeconds);
|
||||
}
|
||||
|
||||
private void PlayBuiltSound()
|
||||
{
|
||||
AudioManager.Instance?.Play(builtSound.clip, AudioCategory.UI, builtSound.RandomPitch(), builtSound.volume);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue