Fixing issues with compiling for android haxe 3
Made switchState call happen within update, so _state.create() runs on the same thread as _state.update().