Example #1
0
 void Awake()
 {
     // Get components
     client = GetComponent <ClientF> ();
     populationController = GetComponent <PopulationControllerF> ();
     uiController         = GetComponent <UIControllerF> ();
     gameController       = GetComponent <GameControllerF> ();
     scoreManager         = GetComponent <ScoresManagerF> ();
     ac = GetComponent <ACF> ();
 }
Example #2
0
    // -------------- Overloaded methods from MonoBehavior ---------------------------- //

    void Awake()
    {
        // Get components
        uiController  = GetComponent <UIControllerF> ();
        fogController = GetComponent <FogControllerF> ();
        round         = GetComponent <RoundF> ();
        tutorial      = GetComponent <TutorialF> ();
        client        = GetComponent <ClientF> ();

        GetParameters();
    }
    // Use this for initialization
    void Start()
    {
        // Get button component and connect it
        btn = GetComponent <Button> ();
        try {
            btn.onClick.AddListener(TaskOnClick);
        } catch (NullReferenceException e) {
            Debug.Log("Error with buttonName '" + buttonName + "'");
            throw e;
        }

        // Get UIController
        uiController = GameObject.FindGameObjectWithTag("GameController").GetComponent <UIControllerF> ();
    }
 // Use this for initialization
 void Start()
 {
     // Get components
     uiController = GameObject.FindGameObjectWithTag("GameController").GetComponent <UIControllerF> ();
 }