public override void OnInspectorGUI() { // Draw the default base.OnInspectorGUI(); // Place the button at the bottom SimpleInteractableMenuCollection myScript = (SimpleInteractableMenuCollection)target; if (GUILayout.Button("Update SimpleInteractableMenuCollection")) { myScript.UpdateCollection(); } }
protected IEnumerator ShowGameplayFeedback() { string userName = "******"; string result = string.Empty; if (!LanderGameplay.Instance.HasCrashed) { // Landed successfully result = string.Format(SuccessPhrases[Random.Range(0, SuccessPhrases.Length)], userName); } else { // Failed result = string.Format(FailurePhrases[Random.Range(0, FailurePhrases.Length)], userName); } SimpleInteractableMenuCollection menu = this.gameplayFinishedMenu.GetComponent <SimpleInteractableMenuCollection>(); menu.TitleText = SimpleDialogShell.WordWrap(result, MaxCharsPerLine); menu.SubtitleText = "Your score: " + LanderGameplay.Instance.Score.ToString(); // Set this true regardless highScoreDisplayParent.SetActive(true); // TEMP disable high score //highScoreDisplay.SetActive(true); // If we got a high score, show the leaderboard and wait for input // TEMP disable high score /*if (HighScoreManager.Instance.IsHighScore (LanderGameplay.Instance.Score)) { * highScoreInputField.gameObject.SetActive(true); * directionIndicator.TargetObject = highScoreInputField.gameObject; * // Set the text to the last high score input * Keyboard.Instance.m_InputField.text = highScoreText; * Keyboard.Instance.onTextUpdated += OnTextUpdated; * // TODO set focuser based on control scheme * Keyboard.Instance.PresentKeyboard(HUX.Focus.FocusManager.Instance.GazeFocuser); * }*/ // Show the try again menu gameplayFinishedMenu.SetActive(true); directionIndicator.TargetObject = gameplayFinishedMenu.gameObject; yield break; }