Advertisement
Guest User

Untitled

a guest
Oct 30th, 2013
34
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.96 KB | None | 0 0
  1. package sourceGame;
  2.  
  3. import com.jme3.app.Application;
  4. import com.jme3.app.SimpleApplication;
  5. import com.jme3.app.state.AbstractAppState;
  6. import com.jme3.app.state.AppStateManager;
  7. import com.jme3.system.AppSettings;
  8.  
  9. /**
  10.  *
  11.  * @author Skatty
  12.  */
  13. public class Game extends SimpleApplication {
  14.     private static int frameRate = 200;
  15.     private Application app;
  16.     private GameState gameState;
  17.     private MenuState menuState;
  18.    
  19.   public static void main(String[] args) {
  20.     Game app = new Game();
  21.     AppSettings settings = new AppSettings(true);
  22. settings.setFrameRate(frameRate);
  23. app.setSettings(settings);
  24.     app.start();
  25.    
  26.   }
  27.  
  28.     @Override
  29.     public void simpleInitApp() {
  30.        // Initialize game states
  31.         gameState    = new GameState(this);
  32.         menuState = new MenuState(this);
  33.        // Run game state
  34.         stateManager.attach(gameState);
  35.     }
  36.  @Override
  37.   public void simpleUpdate(float tpf) {
  38.  }
  39.  
  40. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement