2018-06-18 15:17:56 -07:00

33 lines
861 B
Java

package com.jalenwinslow.game.states;
import com.badlogic.gdx.graphics.g2d.SpriteBatch;
import com.jalenwinslow.game.Handler;
/**
* Created by jalen on --/--/--.
*/
public abstract class State {
protected Handler handler;
private static State currentState = null, previousState = null;
public State(Handler handler) {
this.handler = handler;
}
public abstract void init(int initState);
public abstract void update(float dt);
public abstract void render(SpriteBatch batch);
public abstract void dispose();
//Getters and Setters
public static State getCurrentState() {return currentState;}
public static State getPreviousState() {return previousState;}
public static void setCurrentState(State state) {
State.previousState = State.currentState;
State.currentState = state;
}
}