public void Run(string s) { // load dialog and run, such as "Assets/Dialog/control_test.yaml" DialogRunner.GetInstance().StopDialog(); DialogRunner.Run(this, s); Clear(); }
void Awake() { instance = this; _replicaText.text = ""; _animator = GetComponent <Animator>(); _blockingPanel.SetActive(false); _mainCanvas.GetComponent <CanvasGroup>().alpha = 0f; }
// should never try to run dialog when one is already in progress. // check DialogRunner.Active before trying to run dialog. // for now, also throw an error public static void Run(IDialogUI ui, string path) { DialogRunner runner = GetInstance(); if (runner.dialog != null) { throw new DialogError("Another dialog session is already open."); } runner.dialog = runner.StartCoroutine(runner.RunDialog(ui, path)); }
// Update is called once per frame void Update() { if (nextPressed) { if (textScroll != null) { StopCoroutine(textScroll); textScroll = null; chatbox.SetText(text); } DialogRunner.RequestAdvance(); } nextPressed = false; }
public override object EditValue(ITypeDescriptorContext context, IServiceProvider provider, object objValue) { if (provider != null && context != null) { var serviceProvider = context.Container as IServiceProvider; if (serviceProvider == null) { var componentSite = (context.Instance as IComponent)?.Site; if (componentSite == null) { return(objValue); } serviceProvider = componentSite; } var rootReport = (DesignerExtensions.GetService <IDesignerHost>(serviceProvider).RootComponent as XRControl)?.RootReport; if (rootReport == null) { return(objValue); } var dataContainer = context.Instance as IDataContainer; if (dataContainer == null) { return(objValue); } var form = new FilterStringEditorForm(provider, dataContainer.GetEffectiveDataSource(), dataContainer.DataMember, rootReport.Parameters, rootReport) { FilterString = (string)objValue }; if (DialogRunner.ShowDialog(form, provider) != DialogResult.Cancel) { objValue = form.FilterString; } } return(objValue); }
protected override void Initialize() { Engine.ContentManager = this.Content; Engine.Graphics = this.graphics; Engine.Project = this; Engine.DialogRunner = new DialogRunner(); base.Initialize(); }
private void Awake() { runner = new DialogRunner(dialog, controls); trigger = new Trigger(() => runner.StartDialog(), ShouldTriggerDialog); }
// Start is called before the first frame update void Start() { flags = DialogRunner.GetInstance().Flags; }