private void UpdateUI(Scene arg0, LoadSceneMode arg1) { // Store the instance of the game manager GameManager gameManager = GameManager.Instance; // Win button only interactable if a game manager exists in this scene winButton.interactable = gameManager; // Can only override levels if you found a level navigator LevelNavigator navigator = FindObjectOfType <LevelNavigator>(); toggleLevelOverrideButton.interactable = navigator; // Verbose inspector only interactable if there is a game manager toggleVerboseInspectorButton.interactable = gameManager; // If a game manager exists then connect the verbose inspector // to the in game inspector if (gameManager) { verboseInspector.ConnectInspector(gameManager.m_inspector); } // Otherwise disable the verbose inspector else { SetVerboseInspectorActive(false); } }
private void ChangeCurrentLevel(LevelNavigator nav) { switch (nav) { case LevelNavigator.NEXT: { currentSceneIndex++; break; } case LevelNavigator.PREVIOUS: { currentSceneIndex++; break; } } }
private void ToggleLevelSelectOverride() { LevelNavigator navigator = FindObjectOfType <LevelNavigator>(); // If the navigator exists then toggle its override if (navigator) { LevelID maxID = new LevelID(LevelDataLoader.MaxLevel() + 1, 1); navigator.ToggleOverride(maxID); } }
void OnClick() { AudioManager.Instance.PlayFx(AudioManager.FxType.Click); LevelNavigator.NavigateTo(SceneName); }
private void OnDialogOkClicked(DialogInstance dialogInstance) { LevelNavigator.NavigateTo("01_Title"); }