Ejemplo n.º 1
0
        // Token: 0x06001858 RID: 6232 RVA: 0x0005B998 File Offset: 0x00059B98
        public bool Push(ref global::CCDesc.Hit evnt)
        {
            if (this.issuingEvent)
            {
                Debug.LogError("Push during event call back");
                return(false);
            }
            global::CCDesc.HitFilter onHit = this.OnHit;
            if (onHit != null)
            {
                bool flag = false;
                try
                {
                    this.issuingEvent = true;
                    flag = !onHit(this, ref evnt);
                }
                catch (Exception ex)
                {
                    Debug.LogException(ex);
                }
                finally
                {
                    this.issuingEvent = false;
                }
                if (flag)
                {
                    return(false);
                }
            }
            int num = this.filledCount++;

            if (this.filledCount > this.bufferSize)
            {
                do
                {
                    this.bufferSize += 8;
                }while (this.filledCount > this.bufferSize);
                if (this.filledCount > 1)
                {
                    global::CCDesc.Hit[] sourceArray = this.buffer;
                    this.buffer = new global::CCDesc.Hit[this.bufferSize];
                    Array.Copy(sourceArray, this.buffer, this.filledCount - 1);
                }
                else
                {
                    this.buffer = new global::CCDesc.Hit[this.bufferSize];
                }
            }
            this.buffer[num] = evnt;
            return(true);
        }
Ejemplo n.º 2
0
 // Token: 0x06001857 RID: 6231 RVA: 0x0005B954 File Offset: 0x00059B54
 public bool Push(ControllerColliderHit cchit)
 {
     if (this.issuingEvent)
     {
         Debug.LogError("Push during event call back");
         return(false);
     }
     if (!object.ReferenceEquals(cchit, null))
     {
         global::CCDesc.Hit hit = new global::CCDesc.Hit(cchit);
         return(this.Push(ref hit));
     }
     return(false);
 }
Ejemplo n.º 3
0
 // Token: 0x0600185E RID: 6238 RVA: 0x0005BBBC File Offset: 0x00059DBC
 public global::CCDesc.Hit[] ToArray()
 {
     global::CCDesc.Hit[] array = new global::CCDesc.Hit[this.filledCount];
     this.CopyTo(array, 0);
     return(array);
 }