Пример #1
0
    //play the intro animation, assign scripts to variables


    void Start()
    {
        clip.Play();
        bs  = GetComponent <BossStats> ();
        bm  = GetComponent <Boss1Movement> ();
        eod = GetComponent <EffectOnDeath> ();
        gc  = GameObject.Find("Game Controller").GetComponent <GameController> ();

        //begin coroutines if the player is alive
        if (player = GameObject.FindGameObjectWithTag("Player"))
        {
            StartCoroutine(AimTurrets());
            StartCoroutine(BossAttacks());
            StartCoroutine(bm.Hover());
        }

        //initialise the health bar
        bs.health       = bs.maxHealth;
        healthBar       = GameObject.Find("Boss Health Bar").GetComponent <Slider>();
        healthBar.value = bs.health;
    }