Exemplo n.º 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);
        }
Exemplo n.º 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);
            }
        }
Exemplo n.º 3
0
        /// <summary>
        /// Displays a Dialog Page
        /// </summary>
        /// <param name="infos">Infos.</param>
        public static void DisplayDialogOption(List <string> dialogRows, PopulateVertical populateDialog)
        {
            PopulateVerticalToggle popVertical = populateDialog as PopulateVerticalToggle;

            popVertical.ClearDialogBox();
            if (dialogRows.Count > 0)
            {
                foreach (var dialogRow in dialogRows)
                {
                    popVertical.addDialogOption(dialogRow);
                }
            }
        }
Exemplo n.º 4
0
        /// <summary>
        /// Shows the next.
        /// </summary>
        /// <param name="playerDialogManager">Player dialog manager.</param>
        /// <param name="populateDialog">Populate dialog.</param>
        private void ShowNext(PlayerDialogManager playerDialogManager, PopulateVerticalToggle populateDialog)
        {
            List <string> dialogRows = playerDialogManager.GetNextDialogPackageFromNPC();

            if (dialogRows != null && dialogRows.Count > 0)
            {
                if (nextIsOption)
                {
                    DialogDisplayManager.DisplayDialogOption(dialogRows, populateDialog);
                }
                else
                {
                    DialogDisplayManager.DisplayDialogText(dialogRows, populateDialog);
                }
            }
        }
Exemplo n.º 5
0
 /// <summary>
 /// Lasts the was option.
 /// </summary>
 /// <returns><c>true</c>, if was option was lasted, <c>false</c> otherwise.</returns>
 /// <param name="popualteVertical">Popualte vertical.</param>
 public static bool LastWasOption(PopulateVerticalToggle popualteVertical)
 {
     return(popualteVertical.HasSelectedToggle());
 }