void MotherShipSetUp(MotherShip_Data x) { x.GetComponent <PathFollow>().enabled = false; x.GetComponent <SeekBehaviour>().weight = 1f; x.GetComponent <Boid_Data>().target = Vector3.zero; float dist = Vector3.Distance(x.transform.position, Vector3.zero); if (dist < x.distFromCenter) { x.GetComponent <PathFollow>().enabled = true; x.GetComponent <SeekBehaviour>().weight = 0f; x.GetComponent <PathFollow>().weight = 1f; x.GetComponent <Boid_Data>().action = Boid_Data.Behaviour.run; SpawnCombatBoid(x); } }
void SpawnCombatBoid(MotherShip_Data x) { x.StartCoroutine(x.Spawn()); }