public void setFpsShowing(boolean fpsShowing) {
if (fpsShowing) {
fpsCounter.reset();
ConditionalTaskStateFactory taskStateFactory = new ConditionalTaskStateFactory();
ConditionalTaskState fpsTickerState = taskStateFactory.createConditionalTaskState(FpsTicker.class);
fpsTicker = new FpsTicker(fpsTickerState, fpsCounter);
universe.getSynchronizer().schedule(fpsTicker);
} else {
if (this.fpsShowing) {
// only unschedule the fpsTicker if it was previously scheduled
universe.getSynchronizer().unschedule(fpsTicker);