/// <summary> Handles Clicking an Action Button </summary> public void ClickActionButton(int actionIndex) { parent.DoAction(actionIndex); if (mode == InteractableUIMode.GridSelect || mode == InteractableUIMode.ListSelect) { hideActions(); } else if (mode == InteractableUIMode.Dialogue) { actionButtons[5].transform.GetComponentInChildren <TMPro.TextMeshProUGUI>().text = actionButtons[actionIndex].GetComponentInChildren <TMPro.TextMeshProUGUI>().text; dialogueSelected = true; hideActions(); } if (GameManager.Mode == GameMode.Rehearsal) { if (actionIndex == InteractablePath.NextInteractable.ID.actionID) { InteractablePath.GoToNextInteractable(); } } else if (GameManager.Mode == GameMode.Recall) { InteractableLog.Add(parent, parent.ActionIndex); } }
private void Awake() { path = InteractablePath.Instance; log = InteractableLog.Instance; InitializeSeed(); }
/// <summary> Handles Clicking a Checkmark Button </summary> public void onClickCheck() { SetCheckButtonActive(false); if (GameManager.Mode == GameMode.Rehearsal && parent == InteractablePath.NextInteractable && parent.ActionIndex == InteractablePath.NextAction) { InteractableManager.SetActiveInteractable(parent, parent.ActionIndex); progressButton.checkmarkAnimate(); InteractableLog.Add(parent, parent.ActionIndex); InteractablePath.GoToNextInteractable(); if (mode == InteractableUIMode.NextPrevSelect) { progressButton.SetActive(false); } } else if (GameManager.Mode == GameMode.Rehearsal) { progressButton.exAnimate(); } else if (GameManager.Mode == GameMode.Recall) { progressButton.checkmarkAnimate(); InteractableLog.Add(parent, parent.ActionIndex); } }
/// <summary> Intialize Interactable Path and Log for MultiLevel Game </summary> static public void InitalizePathAndLogForMultiLevelGame() { InteractablePath.GeneratePathFromSeed(SeedString); InteractablePath.InitializeNextInteractable(); Instance.isNextHighlighted = false; ShowLevelComplete = false; }
/// <summary> Reset Interactable Path and Log </summary> static public void InitalizePathAndLog() { InteractablePath.ResetPath(); InteractablePath.GeneratePathFromSeed(SeedString); InteractableLog.Clear(); Instance.isNextHighlighted = false; IsPathInitialized = true; ShowLevelComplete = false; }
static public void UndoLastAction() { if (GameManager.Mode == GameMode.Rehearsal) { InteractablePath.UndoLastAction(); } else if (GameManager.Mode == GameMode.Recall) { InteractableLog.UndoLastAction(); } }
/// <summary> Handles Clicking a Checkmark Button </summary> public void onClickCheck() { SetCheckButtonActive(false); if (GameManager.Mode == GameMode.Rehearsal) { InteractablePath.GoToNextInteractable(); } else if (GameManager.Mode == GameMode.Recall) { InteractableLog.Add(parent, parent.currentStateID); } }
/// <summary> Activates Checkmark on GridSelect and ListSelect Buttons </summary> private void SetCheckImageActive() { if (mode == InteractableUIMode.GridSelect || mode == InteractableUIMode.ListSelect) { if (InteractablePath.isNextInteractable(parent)) { checkImages[InteractablePath.NextInteractable.ID.actionID].gameObject.SetActive(true); } else { checkImages[0].gameObject.SetActive(false); checkImages[1].gameObject.SetActive(false); checkImages[2].gameObject.SetActive(false); checkImages[3].gameObject.SetActive(false); } } }
private void Update() { if (InteractableManager.InteractableList.Length == 0) { return; } if (GameManager.Mode == GameMode.Rehearsal) { if (!isNextHighlighted) { InteractablePath.InitializeNextInteractable(); isNextHighlighted = true; } if (InteractablePath.PathComplete) { GameManager.State = GameState.End; EndGameUI.ToggleOn(); } else if (LevelManager.IsMultiLevelGame && ShowLevelComplete) { GameManager.State = GameState.Menu; if (!GameManager.TutorialMode) { LevelClearUI.ToggleOn(); } } } else if (GameManager.Mode == GameMode.Recall) { if (InteractableLog.PathComplete) { GameManager.State = GameState.End; EndGameUI.ToggleOn(); } else if (LevelManager.IsMultiLevelGame && ShowLevelComplete) { GameManager.State = GameState.Menu; if (!GameManager.TutorialMode) { LevelClearUI.ToggleOn(); } } } }
/// <summary> Handles Clicking a Checkmark Button </summary> public void onClickCheck() { SetCheckButtonActive(false); if (GameManager.Mode == GameMode.Rehearsal) { InteractablePath.GoToNextInteractable(); if (mode == InteractableUIMode.NextPrevSelect) { actionUI.GetComponentInChildren <ProgressButton>().SetActive(false); } } else if (GameManager.Mode == GameMode.Recall) { InteractableLog.Add(parent, parent.ActionIndex); } }
private void Update() { if (InteractableManager.InteractableList.Length == 0) { return; } if (GameManager.Mode == GameMode.Rehearsal) { if (!isNextHighlighted) { InteractablePath.InitializeNextInteractable(); isNextHighlighted = true; } if (InteractablePath.PathComplete) { GameManager.State = GameState.End; EndGameUI.ToggleOn(); } else if (LevelManager.IsMultiLevelGame && ShowLevelComplete) { GameManager.State = GameState.Menu; LevelClearUI.ToggleOn(); } } else if (GameManager.Mode == GameMode.Recall) { if (InteractableLog.PathComplete) { SeedConverter converter = new SeedConverter(); SeedString = converter.DecodeSeed(); GameManager.State = GameState.End; EndGameUI.ToggleOn(); } else if (LevelManager.IsMultiLevelGame && ShowLevelComplete) { GameManager.State = GameState.Menu; LevelClearUI.ToggleOn(); } } }
/// <summary> Activates Checkmarks for Rehearal Mode </summary> public void SetCheckmark(int actionIndex) { if (GameManager.Mode == GameMode.Rehearsal) { SetCheckImageActive(); if (InteractablePath.isNextInteractable(parent) && actionIndex == InteractablePath.NextInteractable.ID.actionID) { SetCheckButtonActive(true); } else { SetCheckButtonActive(false); } } else if (GameManager.Mode == GameMode.Recall) { SetCheckButtonActive(true); } }
/// <summary> Handles Clicking an Action Button </summary> public void ClickActionButton(int actionIndex) { parent.DoAction(actionIndex); if (mode == InteractableUIMode.GridSelect || mode == InteractableUIMode.ListSelect) { hideActions(); } if (GameManager.Mode == GameMode.Rehearsal) { if (actionIndex == InteractablePath.NextInteractable.ID.actionID) { InteractablePath.GoToNextInteractable(); } } else if (GameManager.Mode == GameMode.Recall) { InteractableLog.Add(parent, parent.currentStateID); } }
static public InteractableID[] GetPathIDs() { return(InteractablePath.GetPathIDsFromSeed(SeedString)); }