Exemplo n.º 1
0
    void bossHP()
    {
        boss2scri witch = GameObject.Find("boss2").GetComponent <boss2scri>();

        Hpbar.fillAmount = witch.hp / 1500f;

        if (witch.hp <= 0)
        {
            Destroy(gameObject);
        }
    }
Exemplo n.º 2
0
    public void clicked()
    {
        boss2scri witch = GameObject.Find("boss2").GetComponent <boss2scri>();



        if (witch.barrier > 0)
        {
            witch.barrier = witch.barrier - 150;
        }
        else if (witch.barrier <= 0)
        {
            witch.hp = witch.hp - 250;
        }
    }
Exemplo n.º 3
0
    void OnTriggerStay(Collider c)
    {
        //Damage aratk = GameObject.Find("Damage").GetComponent<Damage>();
        boss2scri witch = GameObject.Find("boss2").GetComponent <boss2scri>();

        if (c.gameObject == aboss)
        {
            Destroy(gameObject, 5f);
            witch.hp = witch.hp - Damage.icebombdamage;
        }

        if (c.gameObject == bboss)
        {
            goblinscri Boss = GameObject.Find("goblin").GetComponent <goblinscri>();

            Destroy(gameObject, 5f);
            Boss.hp = Boss.hp - Damage.icebombdamage;
        }
        Destroy(gameObject, 5f);
    }
    // Update is called once per frame
    void Update()
    {
        AnimationUpdate();
        navigate();

        if (hp<=0)
        {
            Destroy(gameObject, 0.5f);
        }

        if (hp <= 1)
        {
            boss2scri witch = GameObject.Find("boss2").GetComponent<boss2scri>();
            if (spawnCheck)
                return;
            spawnCheck = true;

            witch.barrier = witch.barrier - 50;

        }
    }
    void OnTriggerEnter(Collider c)
    {
        Vector3 pos = c.GetComponent <Transform>().position;

        summon.transform.position = pos + new Vector3(0, 1, 0);
        boss2scri witch = GameObject.Find("boss2").GetComponent <boss2scri>();

        if (c.gameObject == aboss)
        {
            summon.gameObject.SetActive(true);
            summon.Play();
            GameObject.Find("long_damage_sound").GetComponent <AudioSource>().Play();
            Destroy(gameObject);

            witch.hp = witch.hp - Damage.wizatk;
        }

        if (c.gameObject == barr)
        {
            Destroy(gameObject);
        }

        Destroy(gameObject, 0.3f);
    }