Exemplo n.º 1
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);
        }
Exemplo n.º 2
0
 public static LayerComparer FromDirection(int dir)
 {
     return(LayerComparer.FromDirection((MobileDirection)dir));
 }