I am trying to make a prototype for new game
My game has 3 different characters, they are all placed in the world and you can switch between them by pressing tab
I am not sure how will i handle the input.
- I can create 3 player controllers, each per character and implementing the tab logic in each one of them
- I can create 1 player controller which pass the input to the selected character
The first solution is ok but i will have code duplication at each one of the player controller of the switching characters logic
The second solution solves it but it sounds like it is not the way i am supposed to to this
What is the best way here? it there a third way that i am missing?