What is the difference between the constructor of a
BasicGameState and the
init method? It appears that they are both called at the same time when the
BasicGameState is registered in
StateBasedGame, so what makes them different?
A follow up question to this is how do I run a method only when a state becomes active? Initially I thought the
init method was only called when a new state becomes active, but this is not true. Note that I'd like to call this method only once at the beginning of the new state, so putting it in the
update method seems like the wrong place.