예제 #1
0
        /// <summary>
        /// Callback when the dialog is ready to close
        /// </summary>
        public void DoneFinished()
        {
            if (DoneCallback != null)
            {
                DoneCallback(this);
            }

            Target.SetActive(false);

            if (_destroyOnClose)
            {
                Destroy(gameObject);
            }

            // decrease open count - not thread safe, but should be ok!
            DialogManager.Instance.Count--;
            IsShown = false;

            if (_swapToDialogInstance != null)
            {
                _swapToDialogInstance.Show(destroyOnClose: false);
                _swapToDialogInstance = null;
            }
        }
예제 #2
0
 /// <summary>
 /// Called when this instance is created for one time initialisation.
 /// </summary>
 /// Override this in your own base class if you want to customise the settings window. Be sure to call this base instance first.
 protected override void GameSetup()
 {
     DialogInstance = GetComponent <DialogInstance>();
     Assert.IsNotNull(DialogInstance.Target, "Ensure that you have set the script execution order of dialog instance in project settings (see help for details.");
 }
예제 #3
0
 /// <summary>
 /// Complete the current dialog and swap to the specified one, running any transitions (requires Beautiful Transitions)
 /// </summary>
 /// <param name="dialogInstance"></param>
 public void SwapTo(DialogInstance dialogInstance)
 {
     _swapToDialogInstance = dialogInstance;
     Done();
 }