Exemplo n.º 1
0
    private void Awake()
    {
        if (Instance == null)
        {
            Instance = this;
        }
        Health = MaxHealth;

        maxLabel.enabled = false;
        Movement         = GetComponent <MovingSphere>();
        Movement.enabled = false;
    }
Exemplo n.º 2
0
    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;
    }
Exemplo n.º 3
0
 public void DisplayLoss(MovingSphere loser)
 {
     loser.DisplayLose();
 }
Exemplo n.º 4
0
 public void DisplayWin(MovingSphere winner)
 {
     winner.DisplayWin();
 }