GetExecutionCount() public method

Returns the number of times this Block has executed.
public GetExecutionCount ( ) : int
return int
コード例 #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) ||
                              hideThisOption.Value;

            // 获取菜单窗口
            var menuDialog = MenuDialog.GetMenuDialog();

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

                var flowchart = GetFlowchart();

                // 替换显示文本中的变量
                string displayText = flowchart.SubstituteVariables(text);

                // 添加菜单
                // 传入菜单参数
                menuDialog.AddOption(displayText, interactable, hideOption, targetBlock);
            }

            Continue();
        }
コード例 #2
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)
            {
                var menuDialog = MenuDialog.GetMenuDialog();
                if (menuDialog != null)
                {
                    menuDialog.SetActive(true);

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

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

            Continue();
        }
コード例 #3
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();
        }