// Use this for initialization void Awake() { if (instance != null && instance != this) { Destroy(gameObject); return; } instance = this; DontDestroyOnLoad(gameObject); }
// Use this for initialization void Awake() { #if UNITY_IOS return; #endif if (instance != null && instance != this) { Destroy(this.gameObject); return; } else { instance = this; } DontDestroyOnLoad(this.gameObject); }
void Awake() { backgroundClouds.SetActive(false); int levelsDone = PlayerPrefsManager.GetLevelsDone(); if (levelsDone >= showBackgroundCloudsAfterNumLevels) { backgroundClouds.SetActive(true); } else { backgroundClouds.SetActive(false); } littleRockstarAds = GameObject.FindGameObjectWithTag("Ads").GetComponent <LittleRockstarAds>(); rockPlayer = GameObject.Find("RockPlayer").GetComponent <RockPlayer>(); }
void Awake() { backgroundClouds.SetActive(false); int levelsDone = PlayerPrefsManager.GetLevelsDone(); if (levelsDone >= 10) { print("LevelsDone TRUE"); backgroundClouds.SetActive(true); } else { backgroundClouds.SetActive(false); print("LevelsDone FALSE"); } littleRockstarAds = GameObject.FindGameObjectWithTag("Ads").GetComponent<LittleRockstarAds>(); rockPlayer = GameObject.Find("RockPlayer").GetComponent<RockPlayer>(); }