public void setState(States state) {
   if (currentState != null) currentState.dispose();
   if (state == States.Splash) {
     currentState = new SplashState(this);
   }
   if (state == States.Title) {
     currentState = new TitleState(this);
   }
   if (state == States.Play) {
     currentState = new PlayState(this);
   }
   if (state == States.GameOver) {
     currentState = new GameOverState(this);
   }
   if (state == States.Credits) {
     currentState = new CreditsState(this);
   }
 }
 public void dispose() {
   currentState.dispose();
 }
 public void resize(int width, int height) {
   currentState.resize(width, height);
 }
 public void draw(float dt) {
   currentState.draw(sr, sb, dt);
 }
 public void update(float dt) {
   currentState.update(dt);
 }
 public void handleInput() {
   currentState.handleInput();
 }