CoderMusgrove

Untitled

Mar 28th, 2015
319
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.46 KB | None | 0 0
  1. public class ProjectWaitWhile extends EGGame {
  2.  
  3.     public ProjectWaitWhile(EGVersion version, String dataFolderName, LwjglApplicationConfiguration config) {
  4.         super(version, dataFolderName, config);
  5.     }
  6.  
  7.     @Override
  8.     protected void init() {
  9.         GameResource.add("ProjectWaitWhile-Atlas", new TextureAtlas(Gdx.files.internal("ProjectWaitWhile.pack")));
  10.         GameResource.add("ProjectWaitWhile-Json", Gdx.files.internal("ProjectWaitWhile.json"));
  11.        
  12.         GameResource.add("ProjectWaitWhile-Skin", new Skin((FileHandle) GameResource.get("ProjectWaitWhile-Json"),
  13.                 (TextureAtlas) GameResource.get("ProjectWaitWhile-Atlas")));
  14.  
  15.         GameStateManager.add("screenMenu", new GameStateMenu());
  16.         GameStateManager.add("screenLoadGame", new GameStateLoadGame());
  17.         setGameState(GameStateManager.get("screenMenu"));
  18.         Gdx.graphics.setDisplayMode(100, 100, false); // Test 1
  19.         Gdx.graphics.setDisplayMode(1280, 720, false); // Test 2
  20.         // I can still resize the window.
  21.     }
  22.  
  23.     @Override
  24.     protected void updateGame() {
  25.         getGameState().update();
  26.     }
  27.  
  28.     @Override
  29.     protected void renderGame() {
  30.         getGameState().render();
  31.     }
  32.  
  33.     public static void main(String... args) {
  34.         LwjglApplicationConfiguration config = new LwjglApplicationConfiguration();
  35.         config.title = "Project Wait a While";
  36.         config.width = 1280;
  37.         config.height = 720;
  38.         config.resizable = true;
  39.         EGVersion version = new EGVersion(0, 0, 1, DevelopmentStatus.Indev);
  40.         new ProjectWaitWhile(version, null, config);
  41.     }
  42. }
Advertisement
Add Comment
Please, Sign In to add comment