Пример #1
0
        public override void PlaceInWorld(int i, int j, Item item)
        {
            Item        useItem = Main.player[Main.myPlayer].inventory[Main.player[Main.myPlayer].selectedItem];
            PackageData data    = new PackageData(new Vector2(i, j), PackageType, useItem.GetGlobalItem <SGlobalItem>().storage);

            CastledWorld.packages.Add(data);
        }
Пример #2
0
        public override void KillMultiTile(int i, int j, int frameX, int frameY)
        {
            PackageData data = new PackageData(Vector2.Zero, PackageType, new BagPickup(0, false));

            foreach (PackageData d in CastledWorld.packages)
            {
                if (d.coordinates == new Vector2(i, j))
                {
                    data = d;
                }
            }
            int item = Item.NewItem(i * 16, j * 16, 16, 48, data.GetPackageType(data.itemType));

            Main.item[item].GetGlobalItem <SGlobalItem>().storage = data.storage;
            foreach (PackageData d in CastledWorld.packages)
            {
                if (d == data)
                {
                    CastledWorld.packages.Remove(d);
                    break;
                }
            }
        }