Пример #1
0
    private void OnTriggerEnter(Collider other)
    {
        if (other.tag == enemyTag)
        {
            if (enemies.Contains(other.gameObject) == true)
            {
                return;
            }

            enemies.Add(other.gameObject);
        }
        else if (other.tag == allyTag)
        {
            if (allies.Contains(other.gameObject) == true)
            {
                return;
            }

            allies.Add(other.gameObject);
            teamCon.CheckAllyInRange(other.transform.Find("AI").GetComponent <TeamController>());
        }
    }