Exemplo n.º 1
0
    void OnTriggerEnter(Collider other)
    {
        if (other.gameObject.tag == "Player" && isAlive == true)
        {
            GameObject g = GameObject.FindGameObjectWithTag("attackBandit");
            wander = g.GetComponent<NPCWander>();
            wander.attackBandit = true;
            isAlive = false;
        }

    }
Exemplo n.º 2
0
    void OnTriggerEnter(Collider other)
    {
        //test = true;
        if (other.gameObject.tag == "Player")
        {
            GameObject g = GameObject.FindGameObjectWithTag("troll");
            wander = g.GetComponent<NPCWander>();
            wander.attackTroll = true;
        }

    }
Exemplo n.º 3
0
    void OnTriggerEnter(Collider other)
    {
        if (other.gameObject.tag == "Player")
        {
        if (spawnTroll == true)
        {
            troll.SetActive(true);
            
                GameObject g = GameObject.FindGameObjectWithTag("troll");
                wander = g.GetComponent<NPCWander>();
                wander.attackTroll = true;
                spawnTroll = false;
            }
        }

    }