private void Start() { swarm.TargetPosition = transform.position; for (int i = 0; i < _amountObject; i++) { swarm.AddSwarmObject(Instantiate(m_SwarmObjectPrefab)); } }
public void GenerateMayaBeeSwarm(int beeNumber) { Transform swarmExit = m_SwarmExits[Random.Range(0, m_SwarmExits.Count)]; FestBeeSwarm swarm = Instantiate(m_BeeSwarmPrefab, swarmExit.position, Quaternion.identity); swarm.ComposedOfAMaya = true; m_festbeeSwarmList.Add(swarm); MayaBee mayaBee = Instantiate(m_MayaBeePrefab, swarm.transform.position, Quaternion.identity); swarm.AddSwarmObject(mayaBee); for (int i = 0; i < beeNumber - 1; i++) { BeeBase bee = Instantiate(m_BeePrefab, swarm.transform.position, Quaternion.identity); swarm.AddSwarmObject(bee); } }