All pastes #966832 Raw Edit

JNoidEngine

public text v1 · immutable
·published 2008-04-02 01:01 UTC
rendered paste body
package jnoid;

import java.awt.Dimension;

import com.golden.gamedev.GameEngine;
import com.golden.gamedev.GameLoader;
import com.golden.gamedev.GameObject;

public abstract class JNoidEngine extends GameEngine {

	public static final int INTRO = 0;
	public static final int MENU = 1;
	public static final int START = 2;
	public static final int OPTIONS = 3;
	public static final int HIGHSCORE = 4;
	public static final int EXIT = 5;
	
	public void initResources() {
		nextGameID = 1;
	}
	
	public GameObject getGame(int gameID) {

		switch(gameID) {
		case INTRO:
			nextGame = new JNoidGame(this);
			break;
		}
	}
	
    public static void main(String[] args) {
        GameLoader game = new GameLoader();
        game.setup(new JNoidGame(), new Dimension(800,600), false);
        game.start();
        
    }
	
}