Ejemplo n.º 1
0
    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");
            }
        }
    }
Ejemplo n.º 2
0
 // Use this for initialization
 void Start()
 {
     camera = GameObject.Find("Main Camera").GetComponent("ScrollingCamera") as ScrollingCamera;
 }
Ejemplo n.º 3
0
    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.mainCamera.GetComponent<ScrollingCamera>().FinishImmediate();
            RotateToLevel(levelToShow);

            if (worldTransition)
            {
                worldTransition = false;
                StartCoroutine("WorldTransition");
            }
        }
    }