Ejemplo n.º 1
0
        public void ShowInventories(Shop shop, ArcBot bot)
        {
            _shop = shop;
            _bot  = bot;
            _animationRotates.Clear();

            if (bot.Weapon == null)
            {
                this.AttachedWeaponID = null;
            }
            else
            {
                this.AttachedWeaponID = bot.Weapon.DNA.UniqueID;
                bot.AttachWeapon(null, ItemToFrom.Nowhere, ItemToFrom.Inventory);
            }

            //TODO: When the user can create weapons in the shop, this will need to be recalculated, and all item cameras need to be adjusted
            double maxWeaponRadius = UtilityCore.Iterate(shop.Inventory.Weapons, bot.Inventory.Weapons).Max(o => o.Radius);

            LoadInventory(lstShopInventory, shop.Inventory, _animationRotates, maxWeaponRadius);
            LoadInventory(lstBotInventory, bot.Inventory, _animationRotates, maxWeaponRadius);
        }