Restructured Player. Instead of one big file, it's split into 3 files: MovementController
, Head
, Sprint
.
This is more modular approach.
There is a Player
scene which combines all the files. It's inherited from MovementController, added Head as inherited scene, added Node with the Sprint script.
This way if somebody doesn't need one of these functionalities, it can be easily removed. That also makes the code cleaner and every file does exactly what it needs to.