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(); }
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(); }
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(); }