/// <summary> /// Shows the dialog. /// </summary> /// <param name="worldPosition">World position to use. Only applied if world position is not already set.</param> virtual public void ShowDialog(Transform worldPosition) { if (worldPosition != null) { if (this.worldPosition == null) { this.worldPosition = worldPosition; } } if (this.worldPosition == null) { worldPosition = transform; } ((RectTransform)target.transform).position = worldPosition.position; if (target != null) { target.SetActive(true); } if (showEffects != null) { foreach (FX_Base fx in showEffects) { fx.StartEffect(); } } dialogTyper = GetComponentInChildren <UIDialogTyper> (); if (dialogTyper != null) { dialogTyper.Show(); StartCoroutine(CheckForTyperHide()); } if (autoHideTime > 0) { StartCoroutine(AutoHide()); } visible = true; }
/// <summary> /// Shows the dialog. /// </summary> /// <param name="worldPosition">World position to use. Only applied if world position is not already set.</param> public virtual void ShowDialog(Transform worldPosition) { if (worldPosition != null) { if (this.worldPosition == null) this.worldPosition = worldPosition; } if (this.worldPosition == null) worldPosition = transform; ((RectTransform)target.transform).position = worldPosition.position; if (target != null) target.SetActive (true); if (showEffects != null) { foreach (FX_Base fx in showEffects) { fx.StartEffect(); } } dialogTyper = GetComponentInChildren <UIDialogTyper> (); if (dialogTyper != null) { dialogTyper.Show (); StartCoroutine(CheckForTyperHide()); } if (autoHideTime > 0) StartCoroutine(AutoHide()); visible = true; }