void Start() { datas = GameObject.FindGameObjectWithTag("Datas").GetComponent <ImportantDatas>(); if (datas.NeedFadeIn) { fadeInOut.gameObject.SetActive(true); //used to clean the screen in the editor fadeAnim.SetTrigger("FadeIn"); } else { datas.NeedFadeIn = true; } MainMenu(); switch (PlayerPrefs.GetString("Idiom", "English")) { case "Portuguese": selectEnglish.SetActive(false); selectPortuguese.SetActive(true); break; case "English": selectEnglish.SetActive(true); selectPortuguese.SetActive(false); break; default: break; } }
private void Start() { datas = GameObject.FindGameObjectWithTag("Datas").GetComponent <ImportantDatas>(); textMP = GetComponent <TextMeshProUGUI>(); textMP.text = datas.GetText(key); }
// Start is called before the first frame update void Start() { datas = GameObject.FindGameObjectWithTag("Datas").GetComponent <ImportantDatas>(); fadeInOut.gameObject.SetActive(true); //used to clean the screen in the editor fadeAnim.SetTrigger("FadeIn"); timeScale = Time.timeScale; canvasPause.SetActive(false); canvasSettings.SetActive(false); canvasGameOver.SetActive(false); canvasGameUI.SetActive(true); }
private void Awake() { Time.timeScale = 1f; //Need this if the scene comes from a pause datas = GameObject.FindGameObjectWithTag("Datas").GetComponent <ImportantDatas>(); if (!useDelay) // if don't want to force a loading { StartCoroutine(LoadingScreen()); } else { //start the cooldown timer randomly, to pass the feel it is real delayCD = new Cooldown(Random.Range(0.1f, delayToLoad)); delayCD.Start(); } }
private void Awake() { datas = GameObject.FindGameObjectWithTag("Datas").GetComponent <ImportantDatas>(); }