Example #1
0
    void Start()
    {
        Init();
        agent = this.gameObject.GetComponent<UnityEngine.AI.NavMeshAgent>();

        switch(type){
        case AItype.lamb:
            routine = CreateLamb();
        break;
        case AItype.wolf:
            routine = CreateWolf();
        break;
        default:
            routine = CreateDrone();
        break;

        }
        if (autoStart)
        {
            routine.Run();
        }
    }
Example #2
0
    // Use this for initialization
    void Start()
    {
        OutToCapturePt = new List<aiBehavior>();
        controlGroups = new Dictionary<CtrlGroupsName, List<baseRtsAI>>();
        blackBoard = new Dictionary<string, System.Object>();

        controlGroups[CtrlGroupsName.all] = new List<baseRtsAI>();
        controlGroups[CtrlGroupsName.capture] = new List<baseRtsAI>();
        controlGroups[CtrlGroupsName.offence] = new List<baseRtsAI>();

        //decide ratio of capturer to offence
        //add defender later

        routine = createAdvancedComputerAI();
        if (autoStart)
        {
            routine.Run();
        }
    }