public virtual void UpdateBelongBounds(BoundsBasedObjectManager <T, U> manager, int belongBoundsIndex)
        {
            // CAUTION:
            // This function called from BoundsBaseObjectManager regurally.
            // Unfortunately, this is not safe.

            if (this.BoundsBasedObjectManager != manager)
            {
                return;
            }

            // NOTE:
            // If managed object belong in out of bounds, keep previous data.

            if (belongBoundsIndex == -1)
            {
                this.OutOfBounds = true;
            }
            else
            {
                this.OutOfBounds       = false;
                this.BelongBoundsIndex = belongBoundsIndex;
            }
        }
Esempio n. 2
0
 public virtual void Awake()
 {
     this.Manager = base.GetComponent <BoundsBasedObjectManager <BOUNDS, DATA> >();
 }