Beispiel #1
0
    // Use this for initialization
    void Start()
    {
        food      = 10f;          // counter that affects to energ
        money     = 10f;
        satisfied = food * 0.99f; // at 10 food this limit will be 8
        hunger    = food * 0.3f;  // ant will head back home when its hunger is 3

        UIController = FindObjectOfType <AntUIcontroller>();
        homeScript   = FindObjectOfType <Home_Script>();
        storeScript  = FindObjectOfType <Store_Script>();
        workScript   = FindObjectOfType <Work_Script>();

        home  = GameObject.Find("home").GetComponent <Transform>();
        work  = GameObject.Find("work").GetComponent <Transform>();
        store = GameObject.Find("store").GetComponent <Transform>();

        homeLocation  = home.transform.position;
        workLocation  = work.transform.position;
        storeLocation = store.transform.position;
        //feed = false;
        hungerBoolean     = false;
        brokeBoolean      = false;
        AntBehaviourState = 0;
    }
Beispiel #2
0
 private void Start()
 {
     ant        = GameObject.Find("Ant").GetComponent <AI_Ant>();
     homeScript = GameObject.Find("home").GetComponent <Home_Script>();
     UIcont     = FindObjectOfType <AntUIcontroller>();
 }
Beispiel #3
0
 private void Start()
 {
     ant          = GameObject.Find("Ant").GetComponent <AI_Ant>();
     UIcont       = FindObjectOfType <AntUIcontroller>();
     foodSupplies = 15;
 }