void Awake() { if (Instance == null) { Instance = this; Application.targetFrameRate = 60; DontDestroyOnLoad(gameObject); inInverseAnimation = false; OnSetPause(false); popupIsOnScreen = false; //Create Worlds worldList_par.Add(LevelsList_w1_par); worldList_par.Add(LevelsList_w2_par); worldList_par.Add(LevelsList_w3_par); worldList_par.Add(LevelsList_w4_par); worldList_par.Add(LevelsList_w5_par); worldList_par.Add(LevelsList_w6_par); LoadLevelsFromSave(); if (SceneManager.GetActiveScene() != SceneManager.GetSceneAt(0)) { UpdateBackgroundColor(); } //Activate GooglePlay Services _GPSHelper = gameObject.AddComponent <GooglePlayServiceHelper>(); StartCoroutine(UpdateAudioGroupsOnDelay(0f)); } else { Destroy(gameObject); } }
void Awake() { if (Instance == null) { Instance = this; Application.targetFrameRate = 60; DontDestroyOnLoad(gameObject); inInverseAnimation = false; OnSetPause(false); popupIsOnScreen = false; //Create Worlds worldList_par.Add(LevelsList_w1_par); worldList_par.Add(LevelsList_w2_par); worldList_par.Add(LevelsList_w3_par); worldList_par.Add(LevelsList_w4_par); worldList_par.Add(LevelsList_w5_par); worldList_par.Add(LevelsList_w6_par); LoadLevelsFromSave(); if (SceneManager.GetActiveScene() != SceneManager.GetSceneAt(0)) UpdateBackgroundColor(); //Activate GooglePlay Services _GPSHelper = gameObject.AddComponent<GooglePlayServiceHelper>(); StartCoroutine(UpdateAudioGroupsOnDelay(0f)); } else { Destroy(gameObject); } }