GameStates and Updatable?

A feature I added to JGN is for any class that needs to have "update()" called on it (and much have a few other methods like shutdown() and isAlive()) implements the interface Updatable.  This allows me to create utilities that work with calling update.  For example I've got JGN.createThread(Updatable … updatables) that returns a Thread when started calls update on all of those updatables until they die.



I think something along these lines would be good in jME specifically for the StandardGame style of game development.  If you want to create things like InputHandlers for your GameState you are either required to build your own custom GameState that creates and updates it or you have to rely on a GameState that has a InputHandler already and gives the ability to be replaced.  If I have a GameState that has an addUpdatable method then you could simply insert the InputHandler in and then no extension is required.



Anyone have any problem with this?  This would require many core aspects of jME to implement the Updatable interface.  However, it shouldn't break anything that already exists and has many other practical benefits I believe.

I don't have an issue with adding the interface, but we should discuss further if you start wanting to go further with it than that in the core itself.

The only major potential problem is some update methods take floats and some are no-args and that could potentially cause some issues deciding how we'd want to manage that.



I would also like to make some changes to GameStates and even remove a few of the GameStates that are already here.  One change to GameStates would be the addition of the addUpdatable method to it and I'd add the feature to StandardGame as well.