public void StartTutorial(bool proceedToGame) { PlayerPrefs.SetInt("SeenTutorial", 1); CrossPlatformInputManager.SwitchActiveInputMethod(CrossPlatformInputManager.ActiveInputMethod.Touch); this.proceedToGame = proceedToGame; _tutorialController.ShowTutorial(); GameController.backButtonLeavesApp = false; MenuPhase = MenuState.Tutorial; tutorialCanvasGroup.interactable = true; if (this.proceedToGame) { _anim.SetTrigger("OpenTutorialFirstTime"); } else { _anim.SetTrigger("OpenTutorial"); } _controlRig.EnableControlRig(true); }
public void Start() { _loadingAnimator = loadingScreen.GetComponent <Animator>(); _leaderboard = FindObjectOfType <LeaderboardController>(); _mobileControlRig = FindObjectOfType <MobileControlRig>(); _waterController = FindObjectOfType <WaterController>(); _garbageCollector = FindObjectOfType <DeactivateOnLeave>(); _player = FindObjectOfType <PlayerController>(); _generator = FindObjectOfType <RandomTerrainGenerator>(); _cameraController = FindObjectOfType <CameraController>(); _easyMode = SettingsManager.easyMode; bool enableTouchControls = SettingsManager.touchControlsEnabled; _mobileControlRig.EnableControlRig(enableTouchControls); CrossPlatformInputManager.SwitchActiveInputMethod(enableTouchControls ? CrossPlatformInputManager.ActiveInputMethod.Touch : CrossPlatformInputManager.ActiveInputMethod.Hardware); audioController.FadeIn(1); if (!PlayerPrefs.HasKey("SeenScoreInfo") && _easyMode) { PlayerPrefs.SetInt("SeenScoreInfo", 1); ShowScoreInfoPopup(); } _generator.GenerateChunk(); }