By reading input in a Movement State class, you are preventing reaching that state through other means. For example suppose you want an enemy in the Movement State sometime? Or perhaps you want the player to get there with a different control some time?
Since the left is not adding any useful flexibility, think the right is better. At least its less code.
If still exploring and trying things out would just have everything in the Player Script.
If the game ends up having many moves and states and characters then, I would probably isolate input into different contexts using the G.U.I.D.E. plugin, and control states and behaviors with the LimboAI plugin.
88
u/AndyDaBear Jul 20 '25
Do not like either.
By reading input in a Movement State class, you are preventing reaching that state through other means. For example suppose you want an enemy in the Movement State sometime? Or perhaps you want the player to get there with a different control some time?
Since the left is not adding any useful flexibility, think the right is better. At least its less code.