Custom properties
From SemanticLab
Custom properties let you save customized properties such as experience, hit points, has spoken to the wizard in your GameObjects.
In the first step you need to register your property's name and default value (for instance experience with default value 0):
public void init(Manager m, ConfigValue v) { ... registerProperty( getClass().getPackage(), "experience", new Integer(0) ); }
You may now access this property using the getProperty and setProperty method. Casting the value to its type is required because these methods save arbitrary objects and therefore always return an Object.
public void increaseExperience { Integer newExperience = (Integer)getProperty( getClass().getPackage(), "experience") + 10; setProperty( getClass().getPackage(), "experience", newExperience); }

