private void Awake() { pikmin = GetComponent <Pikmin>(); pikmin.OnStartFollow.AddListener((x) => OnStartFollow(x)); pikmin.OnStartThrow.AddListener((x) => OnStartThrow(x)); pikmin.OnEndThrow.AddListener((x) => OnEndThrow(x)); }
public void SpawnPikmin(Pikmin pikmin, ref List <Pikmin> pikminList) { for (int i = 0; i < spawnNum; i++) { Pikmin newPikmin = Instantiate(pikmin); newPikmin.transform.position = transform.position + (Random.insideUnitSphere * radius); pikminList.Add(newPikmin); } }