Example #1
0
 private void Awake()
 {
     if (Instance == null)
     {
         Instance = this;
     }
     else
     {
         Destroy(gameObject);
     }
     gameObject.SetActive(false);
 }
Example #2
0
    /// Gather the UI
    ///
    private void Awake()
    {
        m_loginLabel    = transform.FindChild("LoginLabel").GetComponent <Text> ();
        m_balanceAmount = transform.FindChild("BalanceLabel").GetComponent <Text> ();

        m_recipeListPanel        = transform.FindChild("RecipeList").gameObject;
        m_recipeListUIController = m_recipeListPanel.GetComponent <RecipeListUIController>();

        m_characterListPanel        = transform.FindChild("CharacterList").gameObject;
        m_characterListUIController = m_characterListPanel.GetComponent <CharacterListUIController>();

        var createNewPlayerButton = transform.FindChild("CreateNewPlayerButton").GetComponent <Button>();

        createNewPlayerButton.onClick.AddListener(OnCreateNewPlayerClicked);
    }