Class Path, Levels Set and Levels
How it works?
The idea behind the class path is that developers can have a way to make players increase their level and win specified skills on each level up.
At the same time this will provide the possibility to configure different labels for any of the levels in the set from which the class path inherits.
In summary in a class path you will find: a key, the initial label, the labels by level and the skills by level.
In terms of development, an object instance of the ClassPath class:
- Is the one that should receive your player object as parameter which will be set as the "owner".
- This class extends the LevelsSet (which you can handle the experience required by each level).
- It contains the available skills (won on each level).
- It has the add/remove skills and extends the level up/down methods to include the new skills.
This is basically the levels list and handles the level up/down which could be based on the experience. In order to help with the levels creation and handling, this class auto fill and sort methods to handle the gaps. For example, if auto fill is enable and you have a level instance for level 1 and the next level instance is for level 5, then the auto fill will use the same level 1 instance for the middle levels (2, 3 and 4). This class also requires the owner to be specified on creation, with that then we can affect the owner properties using modifiers that are executed on each level up from each level instance (if the level instance has modifiers specified).
A level instance has a key, a label and a Modifiers list to be applied by the LevelsSet class.