示例#1
0
        /// <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);
            }
        }
示例#2
0
        private void Awake()
        {
            path = InteractablePath.Instance;
            log  = InteractableLog.Instance;

            InitializeSeed();
        }
示例#3
0
        /// <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);
            }
        }
示例#4
0
        /// <summary> Intialize Interactable Path and Log for MultiLevel Game </summary>
        static public void InitalizePathAndLogForMultiLevelGame()
        {
            InteractablePath.GeneratePathFromSeed(SeedString);
            InteractablePath.InitializeNextInteractable();

            Instance.isNextHighlighted = false;
            ShowLevelComplete          = false;
        }
示例#5
0
        /// <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;
        }
示例#6
0
 static public void UndoLastAction()
 {
     if (GameManager.Mode == GameMode.Rehearsal)
     {
         InteractablePath.UndoLastAction();
     }
     else if (GameManager.Mode == GameMode.Recall)
     {
         InteractableLog.UndoLastAction();
     }
 }
示例#7
0
        /// <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);
            }
        }
示例#8
0
 /// <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);
         }
     }
 }
示例#9
0
        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();
                    }
                }
            }
        }
示例#10
0
        /// <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);
            }
        }
示例#11
0
        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();
                }
            }
        }
示例#12
0
        /// <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);
            }
        }
示例#13
0
        /// <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);
            }
        }
示例#14
0
 static public InteractableID[] GetPathIDs()
 {
     return(InteractablePath.GetPathIDsFromSeed(SeedString));
 }