Пример #1
0
 // Start is called before the first frame update
 void Start()
 {
     hippity                      = FindObjectOfType <Hippity>();
     beginningTriggered           = false;
     endingTriggered              = false;
     Player.Instance.currentLevel = "FinalLevel";
     //Speak(this.dialog);
     audio      = GetComponent <AudioSource>();
     audio.clip = bossMusic;
     audio.Play();
 }
Пример #2
0
    private void OnTriggerEnter(Collider collision)
    {
        Player  player  = collision.GetComponent <Player>();
        Hippity hippity = collision.GetComponent <Hippity>();

        if (player != null)
        {
            player.TakeDamage(5);
        }

        if (hippity != null)
        {
            hippity.TakeDamage(10);
        }
    }