As it stands right now, our CharacterController class is responsible for the following things:
Read and Report Player Input
Handle Movement and Inertia
Shooting logic
This is problematic, as a "Character Controller" should really only be responsible for handling the first task- reading and reporting player input. Other logic should make calls TO the character controller to read input, and otherwise handle their logic indepedently (Many a game dev has made the terrible mistake of horrendously violating the SRP and having "Player.cs" scripts which are 10k lines long).
For this issue, we will isolate all of the above functionality into different scripts and make the Character Controller serve as an interface for other scripts to read input from.
Remarks
This task is high-priority- we need to move away from shoving everything into the CC as soon as possible to avoid headaches later. The changes made will cause some minor merge conflicts.
Tasks
[x] Give the CharacterController.cs public facing methods to access player input.
[x] Report The current movement input as a property.
[x] Create Actions for the following events:
[x] OnJump
[x] OnShoot
[x] Move anything not related to input to separate files, and fix any errors that occur by doing so.
Brief
As it stands right now, our
CharacterController
class is responsible for the following things:This is problematic, as a "Character Controller" should really only be responsible for handling the first task- reading and reporting player input. Other logic should make calls TO the character controller to read input, and otherwise handle their logic indepedently (Many a game dev has made the terrible mistake of horrendously violating the SRP and having "Player.cs" scripts which are 10k lines long).
For this issue, we will isolate all of the above functionality into different scripts and make the Character Controller serve as an interface for other scripts to read input from.
Remarks
This task is high-priority- we need to move away from shoving everything into the CC as soon as possible to avoid headaches later. The changes made will cause some minor merge conflicts.
Tasks
[x] Give the
CharacterController.cs
public facing methods to access player input.[x] Move anything not related to input to separate files, and fix any errors that occur by doing so.