Inheritance: UICatalogResProvider
Beispiel #1
0
        static void AddFloors()
        {
            var res = new UICatalogFloorResProvider();

            var floors = Content.GameContent.Get.WorldFloors.List();

            for (int i = 0; i < floors.Count; i++)
            {
                var   floor    = (FloorReference)floors[i];
                sbyte category = (sbyte)((floor.ID >= 65534)?5:9);
                _Catalog[category].Insert(0, new UICatalogElement
                {
                    Item = new ObjectCatalogItem()
                    {
                        Name     = floor.Name,
                        Category = category,
                        Price    = (uint)floor.Price,
                    },
                    Special = new UISpecialCatalogElement
                    {
                        Control    = typeof(UIFloorPainter),
                        ResID      = floor.ID,
                        Res        = res,
                        Parameters = new List <int> {
                            (int)floor.ID
                        }                                            //pattern
                    }
                });
            }
        }
Beispiel #2
0
        private static void AddFloors()
        {
            var res = new UICatalogFloorResProvider();

            var floors = Content.Content.Get().WorldFloors.List();

            for (int i = 0; i < floors.Count; i++)
            {
                var floor = (FloorReference)floors[i];
                _Catalog[9].Insert(0, new UICatalogElement
                {
                    Name = floor.Name,
                    Category = 9,
                    Price = (uint)floor.Price,
                    Special = new UISpecialCatalogElement
                    {
                        Control = typeof(UIFloorPainter),
                        ResID = floor.ID,
                        Res = res,
                        Parameters = new List<int> { (int)floor.ID } //pattern
                    }
                });
            }

            _Catalog[5].Insert(0, new UICatalogElement
            {
                Name = "Pool",
                Category = 5,
                Price = (uint)0,
                Special = new UISpecialCatalogElement
                {
                    Control = typeof(UIFloorPainter),
                    ResID = 65535,
                    Res = res,
                    Parameters = new List<int> { (int)65535 } //pattern
                }
            });
        }