Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package sourceGame;
- import com.jme3.app.Application;
- import com.jme3.app.SimpleApplication;
- import com.jme3.app.state.AbstractAppState;
- import com.jme3.app.state.AppStateManager;
- import com.jme3.system.AppSettings;
- /**
- *
- * @author Skatty
- */
- public class Game extends SimpleApplication {
- private static int frameRate = 200;
- private Application app;
- private GameState gameState;
- private MenuState menuState;
- public static void main(String[] args) {
- Game app = new Game();
- AppSettings settings = new AppSettings(true);
- settings.setFrameRate(frameRate);
- app.setSettings(settings);
- app.start();
- }
- @Override
- public void simpleInitApp() {
- // Initialize game states
- gameState = new GameState(this);
- menuState = new MenuState(this);
- // Run game state
- stateManager.attach(gameState);
- }
- @Override
- public void simpleUpdate(float tpf) {
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement