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; }
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); }
public static LayerComparer FromDirection(int dir) { return(LayerComparer.FromDirection((MobileDirection)dir)); }