Exemple #1
0
    // Start is called before the first frame update
    void Start()
    {
        Transition      = GameObject.Find("TransitionCanvas");
        SceneTransition = Transition.GetComponent <SceneTransitionScript>();
        SceneTransition.TransitionOut();



        if (SceneManager.GetActiveScene() == SceneManager.GetSceneByName("IntroScene"))
        {
            resolutions = Screen.resolutions;
            resolutionDropdown.ClearOptions();
            List <string> options           = new List <string>();
            int           currentresolution = 0;
            for (int i = 0; i < resolutions.Length; i++)
            {
                string option = resolutions[i].width + " x " + resolutions[i].height;
                options.Add(option);

                if (resolutions[i].width == Screen.currentResolution.width && resolutions[i].height == Screen.currentResolution.height)
                {
                    currentresolution = i;
                }
            }

            resolutionDropdown.AddOptions(options);
            resolutionDropdown.value = currentresolution;
            resolutionDropdown.RefreshShownValue();
        }
    }
Exemple #2
0
    //Corrutines



    IEnumerator StartLevel()
    {
        SceneTransition.TransitionOut();
        yield return(null);
    }