Пример #1
0
 private void Awake()
 {
     if (_instance != null)
     {
         Destroy(this.gameObject);
     }
     else
     {
         _instance = this;
         DontDestroyOnLoad(this.gameObject);
     }
 }
Пример #2
0
 void Awake()
 {
     if (instance != null)
     {
         Destroy(this.gameObject);
     }
     else
     {
         instance = this;
         DontDestroyOnLoad(this.gameObject);
         win  = PlayerPrefs.GetInt("Win", 0);
         lose = PlayerPrefs.GetInt("Lose", 0);
         tie  = PlayerPrefs.GetInt("Tie", 0);
         ColorUtility.TryParseHtmlString(PlayerPrefs.GetString("PlayerColor", "#FFFFFF"), out playerColor);
         playerName = PlayerPrefs.GetString("PlayerName", "Player" + Random.Range(1, 1000));
     }
 }
Пример #3
0
 private void Start()
 {
     playDataManager  = PlayDataManager.Instance;
     gpuMiningManager = GPUMiningManager.Instance;
 }
Пример #4
0
 void Awake()
 {
     Instance = this;
 }
Пример #5
0
 void Awake()
 {
     instance = this;
 }