private void OnTriggerEnter(Collider other) { script_boidGroup bG = other.GetComponent <script_boidGroup>(); if (bG && bG.GetTeam() == teamIndex && next) { bG.waypoint = next; } }
private void OnCollisionEnter(Collision collision) { if (collision.gameObject.tag == "Enemy") { if (collision.gameObject.GetComponent <Script_BoidsBehaviour>().group.GetTeam() != group.GetTeam()) { collision.gameObject.GetComponent <script_enemyInteractions>().Damage(1); } } }