/**
* TimeHero - http://timehero.sf.net
*
* @license See LICENSE
*/
package it.timehero;
import it.timehero.slick.states.GameState;
import it.timehero.slick.states.HeroCreationState;
import it.timehero.slick.states.MenuPauseState;
import it.timehero.slick.states.MenuState;
import org.newdawn.slick.AppGameContainer;
import org.newdawn.slick.GameContainer;
import org.newdawn.slick.SlickException;
import org.newdawn.slick.state.StateBasedGame;
import org.newdawn.slick.util.Log;
/**
* Main del progetto
* @author AM
* @project Timehero0.2
*/
public class TimeHero extends StateBasedGame {
/**
* Entri point
*
* @param argv The arguments
*/
public static void main(String[] argv) {
try {
Log.info("Timehero Start ");
AppGameContainer container = new AppGameContainer(new TimeHero());
container.setMinimumLogicUpdateInterval(10);
container.setMaximumLogicUpdateInterval(50);
container.setDisplayMode(800,600,false);
container.start();
} catch (SlickException e) {
e.printStackTrace();
}
}
/**
* Create a new game
*/
public TimeHero() {
super("TimeHero 0.2.0 - http://timehero.sf.net");
}
/**
* Registrazione degli stati della partita
* @see org.newdawn.slick.state.StateBasedGame#initStatesList(org.newdawn.slick.GameContainer)
*/
public void initStatesList(GameContainer container) {
Log.info("initStatesList");
//TODO: attivare qui gli stati per riavere il menu principale e quello di creazione pg
//addState(new MenuState());
//addState(new HeroCreationState());
addState(new GameState());
addState(new MenuPauseState());
}
}