public void RemoveFromGrill(Cookable obj) { objectsOnGrill.Remove(obj); if (objectsOnGrill.Count == 0) { grillSoundSource.Stop(); } Food food = null; if (food = obj.GetComponent <Food>()) { Sound_Manager.Instance.PlayRandomSFX(food.grabClips); } }
public void AddToGrill(Cookable obj) { objectsOnGrill.Add(obj); grillSoundSource.Play(); if (objectsOnGrill.Count == 0) { grillSoundSource.Stop(); } Food food = obj.GetComponent <Food>(); if (food != null) { Sound_Manager.Instance.PlayRandomSFX(food.grabClips); } }