示例#1
0
 public void Decode(IReadableBuffer br)
 {
     this.mask.Decode(br);
     if (HasInfo())
     {
         _info = br.Read <UnitInfo>();
     }
     if (HasProp())
     {
         _prop = br.Read <UnitProp>();
     }
 }
示例#2
0
 public void ReleaseToCache()
 {
     this.mask.ClearAllFlag();
     if (_info != null)
     {
         _info.ReleaseToCache();
         _info = null;
     }
     if (_prop != null)
     {
         _prop.ReleaseToCache();
         _prop = null;
     }
     ObjectCache.Put(this);
 }