private void AquireTarget() { Target = Targeting.AquireTaget(tag, transform.position, _factions); if (Target != null) { _targetRigidBody = Target.GetComponent <Rigidbody>(); } }
void Start() { _factions = new List <string> { "Faction1", "Faction2", "Faction3" }; Target = Targeting.AquireTaget(tag, transform.position, _factions); if (Target != null) { _targetRigidBody = Target.GetComponent <Rigidbody>(); } GetComponent <Renderer>().material.color = Faction.Colour(tag); }