public EntityItem(ItemStack ItemStack, Vector2 Position, float scale) : base() { this.ItemStack = ItemStack; this.layer = 2; this.position = Vector2.Zero; this.collidesWithOtherEntities = true; this.collidesWithTiles = true; this.position = Position; this.active = true; this.scale = scale; this.tileWidth = 1; this.tileHeight = 1; this.boundingRect = new Rectangle((int)Position.X, (int)Position.Y, Item.SpriteSize, Item.SpriteSize); this.radius = 2f; this.velocity = new Vector2(0f, 100f); }
void LClick(Object sender, EventArgs args) { Console.WriteLine("TEST?!"); if (World.player.heldStack != null) { if (ItemStack != null) { ItemStack copyStack = ItemStack; ItemStack = World.player.heldStack; World.player.heldStack = copyStack; } else { ItemStack = World.player.heldStack; World.player.heldStack = null; } } else { World.player.heldStack = ItemStack; ItemStack = null; } }
public GuiSlot(int x, int y, int width, int height, ItemStack itemStack) { this.position = new Vector2(x, y); this.boundingBox = new Rectangle(x, y, width, height); ItemStack = itemStack; }