Hi. You did bring up some interesting questions.
Actually, I thought I could pass parameters using Contexts but considering it again now it's a bad way to pass parameters. I'll implement a new way to do that.
- You are right, the example isn't a good example. I'll update it.
- You can actually have duplicate states with different enumerators
- The system does not handle adding states with the same enumerator. Actually, the system does nothing with the context. The states use the context to get the some common parameters (like sf::RenderWindow, TextureHolder etc...) and use them inside the state. So there's no differentiation with the contexts.
- I, now, don't think Contexts are the way to pass parameters, although you can tweak it to pass parameters but that defeats the purpose of having a "Finite State Machine", so I'll think of a better way but if you have any suggestions I'd appreciate it.
- I agree about the name too, now.
EDIT:
You can now pass parameters to a state on initialization. You can also get an individual state from the state manager and call the functions you want.
Thank you so much for your input!