void Awake() { if (Instance == null) { Instance = this; } }
public void PlaySuccessClip() { if (!firstHit) { index++; } else { firstHit = false; } this.gameObject.audio.PlayOneShot(popped[index % popped.Count], 1.0f); CircleGameManager.ResetMissCount(); }
public void PlayMissedClip(CircleBehaviour missedCircle) { if ((missedCircle.partnerCircle == null) || (!missedCircle.partnerCircle.fading)) { if ((index - 1) <= 0) { index = 0; CircleGameManager.IncreaseMissCount(); } else { index--; } } this.gameObject.audio.PlayOneShot(popped[index % popped.Count], 1.0f); }