RPG Equipped Item System
        Posted  
        
            by 
                Jimmt
            
        on Game Development
        
        See other posts from Game Development
        
            or by Jimmt
        
        
        
        Published on 2013-11-02T19:48:32Z
        Indexed on 
            2013/11/02
            22:19 UTC
        
        
        Read the original article
        Hit count: 235
        
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.
© Game Development or respective owner