예제 #1
0
    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;
        }
    }
예제 #2
0
    private void Start()
    {
        datas = GameObject.FindGameObjectWithTag("Datas").GetComponent <ImportantDatas>();

        textMP = GetComponent <TextMeshProUGUI>();

        textMP.text = datas.GetText(key);
    }
예제 #3
0
    // 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);
    }
예제 #4
0
    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();
        }
    }
예제 #5
0
 private void Awake()
 {
     datas = GameObject.FindGameObjectWithTag("Datas").GetComponent <ImportantDatas>();
 }