factored out PhaserState.createEventEmitter().