// Use this for initialization void Start() { audio = Camera.main.GetComponent <AudioSource>(); data = GetComponent <datamanager>(); hd = GameObject.Find("hidethings"); oldcolors = new Color[3] { bolaK.GetComponent <SpriteRenderer>().color, bolaP.GetComponent <SpriteRenderer>().color, bolaJ.GetComponent <SpriteRenderer>().color }; }
IEnumerator reload() { System.TimeSpan tp = new System.TimeSpan(); tp.Add(System.TimeSpan.FromMinutes(10)); Debug.Log("Vou esperar " + 10 * 60 + " para resetar "); yield return(new WaitForSeconds(800)); datamanager dt = GetComponent <datamanager>(); if (dt.psint < 30 && dt.psint > 0 || dt.sorteando || dt.sorteandojackpot) { Debug.Log("vou esepera"); yield return(new WaitForSeconds(100)); } Debug.Log("vou resetar"); SceneManager.LoadScene(1 , LoadSceneMode.Single); }
// Use this for initialization void Awake() { if (instance == null) { currentStage = 1; currentLevel = 1; DontDestroyOnLoad (gameObject); instance = this; }else if(instance != this){ Destroy(instance); } highestStage = 1; highestLevel1 = 1; highestLevel2 = 1; highestLevel3 = 1; highestLevel4 = 1; Load (); }