Introduce stamina and running
A new component
Stamina is introduced which contains a new type
Progress, which is a range between zero and a custom max value. Next to it, it contains
regeneration which defines, how much stamina is automatically filled per second.
If the user presses Shift, it will set the
running attribute in
Moving to true and the
move_movable system will double the velocity. Another system called
empty_stamina_running will set the
running attribute of the
Moving component to false when the entity runs out of stamina.