void Start()
    {
        scrollingCamera = GameObject.FindObjectOfType <ScrollingCamera>();

        instance = this;

        canSpin = true;

        LevelSelectGUI.menuState = MenuState.TITLE;

        AmbientNoise.Play();
        ScreenFade.FadeFrom(new Color(0, 0, 0, 0));
        GUIController.DisableTexts();
        RecordingManager.enableGUI = false;

        // Change skybox based on which world is unlocked
        GetComponent <Skybox>().material = skyboxes[SaveManager.save.worldUnlocked - 1];

        if (worldToShow != "")
        {
            GameObject.Find(worldToShow).SendMessage("OnMouseDown", SendMessageOptions.DontRequireReceiver);
            GameObject.Find(worldToShow).SendMessage("OnMouseUp", SendMessageOptions.DontRequireReceiver);
            Camera.main.GetComponent <ScrollingCamera>().FinishImmediate();
            RotateToLevel(levelToShow);

            if (worldTransition)
            {
                worldTransition = false;
                StartCoroutine("WorldTransition");
            }
        }
    }
示例#2
0
    IEnumerator FadeStart()
    {
        yield return(new WaitForSeconds(fadeStartsIn));

        if (!startedFade)
        {
            startedFade = true;
            ScreenFade.FadeFrom(new Color(0, 0, 0, 0));
            ScreenFade.FadeTo(new Color(0, 0, 0, 1.0f), 1.0f);
        }
    }
示例#3
0
    void Update()
    {
        // Switch to the fade straight away if the user presses a button
        if (!startedFade && Input.GetMouseButton(0))
        {
            startedFade = true;
            ScreenFade.FadeFrom(new Color(0, 0, 0, 0));
            ScreenFade.FadeTo(new Color(0, 0, 0, 1.0f), 1.0f);
        }

        if (ScreenFade.IsDoneFading())
        {
            ScreenFade.ResetDoneFading();
            StartCoroutine("LevelChange");
        }
    }
示例#4
0
    void Start()
    {
        Camera.main.GetComponent <GUILayer>().enabled = false;
        circleLerp = 0;

        srtatingFov = Camera.main.fieldOfView;
        // Orient with camera
        //transform.position = Camera.mainCamera.transform.position + Camera.mainCamera.transform.forward * 10.0f;
        //transform.rotation = Camera.mainCamera.transform.rotation;

        // Load splash screen if this is loaded first
        // (by default it's loaded as the first level to preload it)
        //if (nextLevel == "")
        //Application.LoadLevel("Splash");

        ScreenFade.FadeFrom(new Color(0, 0, 0, 0));
    }