added PostTick()

moved common code from all states into IAppState