private IEnumerator showMessage2() { if (messageLevel > 0) { int rand = UnityEngine.Random.Range(0, points.Length); while (rand == pointTaken) { rand = UnityEngine.Random.Range(0, points.Length); } pointTaken = rand; RectTransform newPos = points[rand].GetComponent <RectTransform>(); messageSprite2.GetComponent <RectTransform>().localPosition = newPos.localPosition; messageSprite2.SetActive(true); messageText2.text = DebuffMessages.getMessageFromLevel(GameTracker.CurrentLevel); yield return(new WaitForSeconds(timeBetweenMessages)); StartCoroutine(hideMessage2()); } }
// Start is called before the first frame update void Start() { Debug.Log(PlayerPrefs.GetFloat("Music")); Debug.Log(Settings.GetBool("Vibration")); Debug.Log(PlayerPrefs.GetFloat("SoundEffects")); Debug.Log(Settings.GetBool("AutomaticLevelSwitch")); Settings.LoadSettingsFromPlayerPrefs(); Debug.Log(Settings.Vibration); Debug.Log(Settings.AutomaticLevelSwitch); Debug.Log(Settings.SoundEffects); Debug.Log(Settings.MusicSound); AdManager.RequestInterstital(); AdManager.RequestReward(); //start off with skin 0 and 1 unlocked PlayerPrefs.SetInt(IDs.hasSkin + 0, 1); PlayerPrefs.SetInt(IDs.hasSkin + 1, 1); DebuffMessages.SetMessages(); }