mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-03-08 04:41:51 +09:00
Former-commit-id: 1647fa32ef6894bd7db44f741f07c2f4dcdf9054 Former-commit-id: 0e5810dcfbe1fd59b13e7cabe9f1e93c5542da2d
49 lines
1.2 KiB
Java
49 lines
1.2 KiB
Java
package org.newdawn.slick.tests;
|
|
|
|
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.tests.states.TestState1;
|
|
import org.newdawn.slick.tests.states.TestState2;
|
|
import org.newdawn.slick.tests.states.TestState3;
|
|
|
|
/**
|
|
* A test for the multi-state based functionality
|
|
*
|
|
* @author kevin
|
|
*/
|
|
public class StateBasedTest extends StateBasedGame {
|
|
|
|
/**
|
|
* Create a new test
|
|
*/
|
|
public StateBasedTest() {
|
|
super("State Based Test");
|
|
}
|
|
|
|
/**
|
|
* @see org.newdawn.slick.state.StateBasedGame#initStatesList(org.newdawn.slick.GameContainer)
|
|
*/
|
|
public void initStatesList(GameContainer container) {
|
|
addState(new TestState1());
|
|
addState(new TestState2());
|
|
addState(new TestState3());
|
|
}
|
|
|
|
/**
|
|
* Entry point to our test
|
|
*
|
|
* @param argv The arguments to pass into the test
|
|
*/
|
|
public static void main(String[] argv) {
|
|
try {
|
|
AppGameContainer container = new AppGameContainer(new StateBasedTest());
|
|
container.setDisplayMode(800,600,false);
|
|
container.start();
|
|
} catch (SlickException e) {
|
|
e.printStackTrace();
|
|
}
|
|
}
|
|
}
|