// Start is called before the first frame update
 private void Start()
 {
     profile = GameObject.Find("Profile_Controller").GetComponent <Profile_Controller>();
     CreateCards();
     RefreshCounters();
     VerifyDeck();
     HandleSave();
 }
示例#2
0
 private void Awake()
 {
     cardList     = new List <Card>();
     index        = 0;
     profile      = GameObject.Find("Profile_Controller").GetComponent <Profile_Controller>();
     balance.text = profile.GetActivePlayer().GetCoinBalance().ToString();
     RefreshMenu();
 }
 void Start()
 {
     dataController    = GameObject.Find("GameData_Controller").GetComponent <GameSettings_Controller>();
     profileController = GameObject.Find("Profile_Controller").GetComponent <Profile_Controller>();
     menuButtons       = new List <Button>();
     currentState      = MenuState.MainMenu;
     CheckIfAlreadyLoggedIn();
     needsUpdate = true;
 }
        void Awake()
        {
            if (instance == null)
            {
                instance         = this;
                formatter        = new BinaryFormatter();
                settingsState    = ProfileSettings.Default;
                needsToBeUpdated = false;
                LoadProfile();
            }

            else
            {
                Destroy(gameObject);
            }
        }