private void CreateFormation() { for (int i = 0; i < totalAgent; i++) { GameObject go = GameObject.CreatePrimitive(PrimitiveType.Capsule); NavIndividual individual = go.AddComponent <IndividualAgent>().individual; group.individualList.Add(individual); } SquareFormation f = new SquareFormation(); f.InitFormation(this.transform.position, this.transform.forward, totalAgent, rowCount, radius); group.AssignFormation(f); }
private void Awake() { individual = new NavIndividual(this); }