I am currently making a survival/exploration game, and I am having a small setback. Making an inventory! Can anybody give me some tips, or an example of an inventory that allows you to click to move items, and a hotbar to move items to.
private Actor slot1; slot1 = new InventorySlot(); getWorld().addObject(slot1, 10, 10);
private InventorySlot[] slots = new InventorySlot[ < max slot count > ]; for (int i=0; i<slots.length; i++) slots[i] = new InventorySlot();
protected void addedToWorld(World world)
{
for (int i=0; i<slots.length; i++) world.addObject(slot[i], < wherever >);
}World world = getWorld(); // or '= this;', if in world class world.removeObject(world.getObjects(InventorySlot.class));