Made switchState call happen within update, so _state.create() runs on the same thread as _state.update().
Merge pull request #290 from crazysam/dev_haxe2

Threading improvements.