I am having difficulty trying to implement a gamestate technique which allows me to switch between different game states by storing the current state in a suitable variable.
I created NSObject *currentState which is set to the current state, but when attempting to message the [currentState method] I get the 'may not respond' error msg. (Because of the NSObject type).
I also tried creating a superclass template called Gamestate and created the individual gamestates while inheriting from the gamestate. However there is another error message relating to the fact that no methods have been implemented within the gamestate object (which is correct as I only want to implement the methods in the sub-objects).
Not sure if protocols would help me. Any suggestions on how to implement gamestate without error messages?
Thanks in advance ;)