void DisableTutorial() { //GUIController.HideText("TutorialText"); tutorialCamera.HideTutorial(); Time.timeScale = 1.0f; }
void DisableTutorial() { GUIController.GUILevelPlay(); //GUIController.HideText("TutorialText"); tutorialCamera.HideTutorial(); GUIController.DisableImage("DragIcon"); //Time.timeScale = 1.0f; tutorialEnabled = false; SendMessage("DeactivateSlowDown"); }
void DisableTutorial() { if (!tutorialCamera.TutorialsEnabled()) { return; } tutorialCamera.HideTutorial(); GUIController.GUILevelPlay(); //GUIController.HideText("Tutorial"); //GUIController.DisableImage("Tap2"); SendMessage("DeactivateSlowDown"); }
void Update() { if (!TutorialCamera.Enabled() && !LevelState.Dead) { if (!grapplingHook.enabled) { grapplingHook.Update(); } // Handle back button if (Input.GetKeyDown(KeyCode.Escape) || Input.GetButtonDown("SkipTutorial")) { GameObject pauseButton = GameObject.Find("Pause"); if (pauseButton != null) { pauseButton.SendMessage("ButtonPressed", SendMessageOptions.DontRequireReceiver); } } if (!started && !GameRecorder.playingBack) { // if (enablePreviews && useStaticPreviews && !GameRecorder.playingBack) // { // // Handle previews // timePassed += Time.deltaTime; // if (timePassed >= previewTime) // { // timePassed = 0.0f; // NextPreview(); // } // } // Start level if player tapped last frame or if reload is disabled if (start || (!reload && !started && (InputManager.pressed || InputManager.released) && !ControlManager.MouseOnGUI && !GameRecorder.playingBack)) { if (!reload) { Debug.Log("Reloading"); foreach (GameObject gameObject in GameObject.FindObjectsOfType(typeof(GameObject))) { Debug.Log(gameObject.name); gameObject.BroadcastMessage("Reload", SendMessageOptions.DontRequireReceiver); } //persistClick = true; //clickpos = InputManager.currentPosition; } playerMovements.GetComponent <Rigidbody>().constraints = RigidbodyConstraints.FreezeRotation; // Apply initial velocity playerMovements.Go(); // Set state start = false; started = true; // Reset camera transform.position = initialCameraPosition; transform.rotation = initialCameraRotation; // Enable camera controller EnableCameraController(); // Initialise systems GameRecorder.playingBack = false; GameRecorder.StartRecording(); GUIController.HideText("Text"); tutorialCamera.HideTutorial(); GUIController.GUILevelPlay(); GUIController.LevelStarted = true; ControlManager.Disabled = false; ScoreCalculator.Reset(); Debug.Log("Playing start level"); MainGUI.Play("StartLevel"); // Try to grapple if (persistClick) { persistClick = false; InputManager.currentPosition = clickpos; grapplingHook.TryGrapple(InputManager.currentPosition); } } else if (!LevelState.Dead) { playerMovements.GetComponent <Rigidbody>().constraints = RigidbodyConstraints.FreezeAll; } // Reload and start level if reload is enabled if (reload && !started && InputManager.pressed && !ControlManager.MouseOnGUI && !GameRecorder.playingBack) { start = true; persistClick = true; clickpos = InputManager.currentPosition; PauseButton.paused = false; Application.LoadLevel(Application.loadedLevelName); InputManager.pressed = true; InputManager.released = true; } } } }