private IEnumerator ShowProcess(HUDMessageChild messsageObject, Transform target, String message, HUDMessage.MessageStyle style, Vector3 offset, Byte delay = 0) { yield return(base.StartCoroutine(this.WaitForOriginalDelay(delay))); while (PersistenSingleton <UIManager> .Instance.IsPause) { yield return(new WaitForEndOfFrame()); } messsageObject.Show(target, message, style, offset); yield break; }
public void Pause(Boolean isPause) { HUDMessageChild[] array = this.childHud; for (Int32 i = 0; i < (Int32)array.Length; i++) { HUDMessageChild hudmessageChild = array[i]; if (hudmessageChild.gameObject.activeInHierarchy) { hudmessageChild.Pause(isPause); } } }
public void UpdateChildPosition() { HUDMessageChild[] array = this.childHud; for (Int32 i = 0; i < (Int32)array.Length; i++) { HUDMessageChild hudmessageChild = array[i]; if (hudmessageChild.gameObject.activeInHierarchy) { hudmessageChild.Follower.UpdateUIPosition(); } } }
public HUDMessageChild Show(Transform target, String message, HUDMessage.MessageStyle style, Vector3 offset, Byte delay = 0) { HUDMessageChild hudmessageChild = (HUDMessageChild)null; if (base.gameObject.activeInHierarchy) { Byte readyObjectIndex = this.GetReadyObjectIndex(); hudmessageChild = this.childHud[(Int32)readyObjectIndex]; if (delay > 0) { base.StartCoroutine(this.ShowProcess(hudmessageChild, target, message, style, offset, delay)); } else { hudmessageChild.Show(target, message, style, offset); } } return(hudmessageChild); }
private Byte GetReadyObjectIndex() { Byte b = 0; Byte b2 = Byte.MaxValue; HUDMessageChild[] array = this.childHud; for (Int32 i = 0; i < (Int32)array.Length; i++) { HUDMessageChild message = array[i]; if (this.IsMessageAvailable(message)) { b2 = b; break; } b = (Byte)(b + 1); } if (b2 == 255) { throw new Exception("HUD message is not available. We will throw System.Exception"); } return(b2); }
public void ReleaseObject(HUDMessageChild messageObject) { messageObject.Clear(); }
private Boolean IsMessageAvailable(HUDMessageChild message) { Boolean flag = !message.gameObject.activeInHierarchy && this.IsMessageIdAvailable(message.MessageId); return((!flag) ? flag : this.SetMessagIdToActive(message.MessageId)); }