RPG Equipped Item System
- by Jimmt
I'm making a 2d rpg with libgdx and java. I have an Inventory class with an Array of Items, and now I want to be able to equip items onto the player. Would it be more managable to do
have every item have an "equipped" boolean flag
have an "equipped" array in the player class
have individual equipped fields in player class, e.g.
private Item equippedWeapon;
private Item equippedArmor;
public void equipWeapon(Item weapon){
equippedWeapon = weapon; }
Or just another way completely? Thanks.