Package it.timehero

Source Code of it.timehero.TimeHero

/**
* 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 {

  /**
   * 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());
  }
 
  /**
   * 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();
    }
  }
}
TOP

Related Classes of it.timehero.TimeHero

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.