Exemple #1
0
    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);
    }
Exemple #2
0
 private void Awake()
 {
     individual = new NavIndividual(this);
 }