void Start() { gameHudManager = this; menuHUD.gameObject.SetActive(true); if (Application.platform == RuntimePlatform.Android) { PlayGamesPlatform.Activate(); normalModeLeaderboard = android_normalModeLeaderboard; hardModeLeaderboard = android_hardModeLeaderboard; } else if (Application.platform == RuntimePlatform.IPhonePlayer) { normalModeLeaderboard = ios_normalModeLeaderboard; hardModeLeaderboard = ios_hardModeLeaderboard; } else { normalModeLeaderboard = ios_normalModeLeaderboard; hardModeLeaderboard = ios_hardModeLeaderboard; } Social.localUser.Authenticate(success => { if (success) { Debug.Log("==iOS GC authenticate OK"); } else { Debug.Log("==iOS GC authenticate Failed"); } }); SetSpecialHeroIndicator(); StartCoroutine(Fps()); //GameManager.OnUIAction += SetText; //GameManager.OnUIAction += SetHeroAvailability; }
void Awake() { if (_instance == null) { //If I am the first instance, make me the Singleton _instance = this; DontDestroyOnLoad(this); } else { //If a Singleton already exists and you find //another reference in scene, destroy it! if (this != _instance) { Destroy(this.gameObject); } } }
private void Awake() { instance = this; }
// Use this for initialization void Start() { MonsterScoreTxt.text = "0"; VictimScoreTxt.text = "0"; instance = this; }