how would I create a new instance of a Already defined object?
On mouse click I want to create a new instance of whatever Actor is in my ArrayList (Inventory) at index (int selected)
Here is what I got so far..
//This code will Activate on mouse click RangedWeapon x = (RangedWeapon)inventory.get(selected); // Gets the object, so It's modular to all weapons getWorld().addObject(y, getX(), getY()); //I want y to be a new instance of what ever x is.