Пример #1
0
        public override bool PreDraw(int i, int j, SpriteBatch spriteBatch)
        {
            displayedItem = false;
            if (weaponPos == Vector2.Zero)
            {
                weaponPos = new Vector2(i, j) * 16;
            }
            if (heldItem == null)
            {
                switch (displayNum)
                {
                default:
                    break;

                case 0:
                    heldItem = new WeaponToDisplay("KingdomTerrahearts/Items/Weapons/Joke/dreamRod", ModContent.ItemType <Items.Weapons.Joke.dreamRod>());
                    break;

                case 1:
                    heldItem = new WeaponToDisplay("KingdomTerrahearts/Items/Weapons/Joke/dreamShield", ModContent.ItemType <Items.Weapons.Joke.dreamShield>());
                    break;

                case 2:
                    heldItem = new WeaponToDisplay("KingdomTerrahearts/Items/Weapons/Joke/dreamSword", ModContent.ItemType <Items.Weapons.Joke.dreamSword>());
                    break;
                }
                displayNum++;
            }
            return(base.PreDraw(i, j, spriteBatch));
        }
Пример #2
0
        public override bool RightClick(int i, int j)
        {
            Vector2 pos = new Vector2(i, j) * 16;

            if (heldItem != null)
            {
                Item.NewItem(pos, heldItem.weaponType);
                heldItem = null;
            }
            else
            {
                heldItem = new WeaponToDisplay("KingdomTerrahearts/Items/Weapons/Joke/dreamSword", ModContent.ItemType <Items.Weapons.Joke.dreamSword>());
            }

            return(true);
        }
Пример #3
0
 public void ChangePlacedItem(WeaponToDisplay weapon)
 {
     heldItem = weapon;
 }