예제 #1
0
    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;
    }
예제 #2
0
 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);
         }
     }
 }
예제 #3
0
 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();
         }
     }
 }
예제 #4
0
    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);
    }
예제 #5
0
    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);
    }
예제 #6
0
 public void ReleaseObject(HUDMessageChild messageObject)
 {
     messageObject.Clear();
 }
예제 #7
0
    private Boolean IsMessageAvailable(HUDMessageChild message)
    {
        Boolean flag = !message.gameObject.activeInHierarchy && this.IsMessageIdAvailable(message.MessageId);

        return((!flag) ? flag : this.SetMessagIdToActive(message.MessageId));
    }