Exemple #1
0
        /// <summary>
        /// Displayes the next Dialog
        /// </summary>
        public void DisplayNextDialog(PopulateVerticalToggle populateDialog)
        {
            GameObject          playerObject        = GameObject.FindGameObjectWithTag(DemoRPGMovement.PLAYER_NAME);
            PlayerDialogManager playerDialogManager = playerObject.GetComponent <PlayerDialogManager>();

            LastWasOption(populateDialog, playerDialogManager);
            nextIsOption = DialogTypeChecker.NextIsOption(playerDialogManager);
            ShowNext(playerDialogManager, populateDialog);
        }
Exemple #2
0
        /// <summary>
        /// If last Dialog was Optiondialog.
        /// </summary>
        /// <param name="populateDialog">Populate dialog.</param>
        /// <param name="playerDialogManager">Player dialog manager.</param>
        private void LastWasOption(PopulateVerticalToggle populateDialog, PlayerDialogManager playerDialogManager)
        {
            bool lastWasOption = DialogTypeChecker.LastWasOption(populateDialog);

            if (lastWasOption)
            {
                int seletedIndex = populateDialog.GetSelectedToggleID();
                playerDialogManager.SetChosenOptionIndex(seletedIndex);
            }
        }