Пример #1
0
        public override void Unload()
        {
            EndlessAmmoUIInstance    = null;
            EndlessAmmoUserInterface = null;

            DataContainer.Unload();
            base.Unload();
        }
Пример #2
0
        public override void Load()
        {
            IL.Terraria.Player.HasAmmo  += Hook.HasAmmo;
            IL.Terraria.Player.PickAmmo += Hook.PickAmmo;
            IL.Terraria.UI.ItemSlot.Draw_SpriteBatch_ItemArray_int_int_Vector2_Color += Hook.ItemSlotDraw;

            if (Main.dedServ)
            {
                return;
            }

            if (SmallItemSlotTexture == null)
            {
                SmallItemSlotTexture = new ScalableTexture2D(GetTexture("InventoryBackSmall"), 4);
            }

            // Create Gnome Reforge Interface

            EndlessAmmoUIInstance    = new EndlessAmmoUI();
            EndlessAmmoUserInterface = new UserInterface();
            EndlessAmmoUserInterface.SetState(EndlessAmmoUIInstance);
        }