public void SelectBot(TermiteFSMBrain botBrain)
    {
        selectedBotBrain = botBrain;

        DestroyStateButtons();
        CreateStateButtons();
    }
Esempio n. 2
0
    public TermiteFSMBrain SpawnBot(int index, string customInit = null)
    {
        //Instantiate the bot
        GameObject      newBot      = (GameObject)Instantiate(Resources.Load("TermiteBotWithTile"));
        TermiteFSMBrain newBotBrain = newBot.GetComponent <TermiteFSMBrain>();


        //Set bot id
        newBotBrain.id = uidCount++;

        //Initialize Termite Brain
        newBotBrain.manager = this.gameObject;
        newBotBrain.Initialize(simManager.structurePlant.supList[index], externalEvents, customInit);


        //Add to botList
        botList.Add(newBot);

        return(newBotBrain);
    }