Example #1
0
 public void ClearCorpseItems()
 {
     if (this.m_CorpseItems != null)
     {
         this.m_CorpseItems.Clear();
     }
     if (this.corpseSortedItems == null)
     {
         return;
     }
     this.corpseSortedItems.Clear();
     this.corpseSortedItems  = (List <Item>)null;
     this.corpseSortComparer = (LayerComparer)null;
 }
Example #2
0
        public List <Item> GetSortedCorpseItems(int direction)
        {
            LayerComparer layerComparer = LayerComparer.FromDirection(direction);

            if (this.corpseSortedItems == null)
            {
                this.corpseSortedItems = new List <Item>((IEnumerable <Item>) this.CorpseItems);
            }
            if (layerComparer != this.corpseSortComparer)
            {
                this.corpseSortComparer = layerComparer;
                this.corpseSortedItems.Sort((IComparer <Item>) this.corpseSortComparer);
            }
            return(this.corpseSortedItems);
        }
Example #3
0
 public static LayerComparer FromDirection(int dir)
 {
     return(LayerComparer.FromDirection((MobileDirection)dir));
 }