示例#1
0
        public override void OnEnter()
        {
            if (setMenuDialog != null)
            {
                // Override the active menu dialog
                MenuDialog.activeMenuDialog = setMenuDialog;
            }

            bool hideOption = (hideIfVisited && targetBlock != null && targetBlock.GetExecutionCount() > 0);

            if (!hideOption)
            {
                MenuDialog menuDialog = MenuDialog.GetMenuDialog();
                if (menuDialog != null)
                {
                    menuDialog.gameObject.SetActive(true);

                    Flowchart flowchart   = GetFlowchart();
                    string    displayText = flowchart.SubstituteVariables(text);

                    menuDialog.AddOption(displayText, interactable, targetBlock);
                }
            }

            Continue();
        }
示例#2
0
        public override void OnEnter()
        {
            CheckEventSystem();

            if (setMenuDialog != null)
            {
                // Override the active menu dialog
                MenuDialog.activeMenuDialog = setMenuDialog;
            }

            bool hideOption = (hideIfVisited && targetBlock != null && targetBlock.GetExecutionCount() > 0);

            if (!hideOption)
            {
                MenuDialog menuDialog = MenuDialog.GetMenuDialog();
                if (menuDialog != null)
                {
                    menuDialog.gameObject.SetActive(true);
                    string displayText = text;
                    menuDialog.AddOption(displayText, targetBlock);
                }
            }

            Continue();
        }
示例#3
0
文件: Menu.cs 项目: Banbury/fungus
        public override void OnEnter()
        {
            CheckEventSystem();

            MenuDialog menuDialog = SetMenuDialog.GetActiveMenuDialog();

            if (menuDialog != null)
            {
                menuDialog.gameObject.SetActive(true);

                if (hideIfVisited &&
                    targetSequence != null &&
                    targetSequence.GetExecutionCount() > 0)
                {
                    // Don't show this option
                }
                else
                {
                    menuDialog.AddOption(text, targetSequence);
                }
            }

            Continue();
        }