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"); } } }
// Use this for initialization void Start() { camera = GameObject.Find("Main Camera").GetComponent("ScrollingCamera") as ScrollingCamera; }
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"); } } }