I don't understand how InputProcessor is supposed to work.
I have multiple Screens for a game. I created a MyInputProcessor class that implements InputProcessor. In my MenuState class I Gdx.input.setInputProcessor to an instance of the class.
First of all, how should I access and set variables that are defined in my
MainMenu classinMyInputProcessor? If I want thetouchDownmethod to change a variable for example.If I switch
Screens, do I have to create a newInputProcessor classto check for other touch events? I obviously don't want it to continue checking for things meant forMainMenu class. How am I supposed to use it?Am I just supposed to create a whole new
InputProcessorfor eachScreen?
I find this all very confusing. Thankful for any help at all.