In my game I’m interested in having some custom movement modes which would function as existing movement modes, but with minor variations. Is there a way to create a new movement mode as a child of an existing movement mode?
Here are a couple examples:
Running movement mode - functions nearly identically to walking, except it would have higher max movement speed and acceleration (might change other variables as well).
Dodging movement mode - similar to walking, with different variables and a different animation.
I know the simpler solution would simply be change the variables speed and acceleration and add Boolean values for running and dodging, but that would not be in line with object oriented principles. Also, it becomes messy rather quickly if changes are necessary, or if more “modes” get added.
I’m familiar with C++, so coding solutions are welcome.