private void Awake() { if (Instance == null) { Instance = this; } Health = MaxHealth; maxLabel.enabled = false; Movement = GetComponent <MovingSphere>(); Movement.enabled = false; }
private void Awake() { audioSource = gameObject.AddComponent <AudioSource>(); audioSource2 = gameObject.AddComponent <AudioSource>(); player = GetComponentInParent <MovingSphere>(); play = (bgm.Length > 0 && endGame && inAir); audioSource.clip = bgm[0]; audioSource.loop = true; audioSource.playOnAwake = true; audioSource.volume = 1; audioSource2.clip = inAir; audioSource2.loop = true; audioSource2.playOnAwake = true; audioSource2.volume = 0; }
public void DisplayLoss(MovingSphere loser) { loser.DisplayLose(); }
public void DisplayWin(MovingSphere winner) { winner.DisplayWin(); }