To get the dispatchers to pass in the state object rather than the player object in the first line above, I put the handler functions into StateManager. This is a pretty good solution, but there might be a better one. Otherwise, if this looks good I'll write the tests.
Really simple implementation, but effective.
To get the dispatchers to pass in the state object rather than the player object in the first line above, I put the handler functions into
StateManager
. This is a pretty good solution, but there might be a better one. Otherwise, if this looks good I'll write the tests.