package com.jukusoft.rpg.game;

import com.jukusoft.rpg.game.engine.app.SimpleGameStateApp;
import com.jukusoft.rpg.game.engine.gamestate.GameState;
import com.jukusoft.rpg.game.engine.gamestate.GameStateManager;
import com.jukusoft.rpg.window.system.IWindow;

/**
 * Created by Justin on 29.11.2016.
 */
public class MyGameApp extends SimpleGameStateApp<GameState> {

    public MyGameApp (boolean useMultiThreading, int fixedFPS, int fixedUPS, boolean vSync) {
        super(useMultiThreading, fixedFPS, fixedUPS, vSync);
    }

    @Override
    protected void onInitGame(GameStateManager<GameState> stateManager) {
        //
    }

    @Override
    protected void onCreateWindow(IWindow window) {
        //set window size
        window.setSize(1280, 720);

        //set window title
        window.setTitle("2D RPG");

        //set clear color to black
        window.setClearColor(0, 0, 0, 0);

        //centralize window
        window.center();
    }

}

@@ -85,16 +85,90 @@
 ateApp;%0A
+import com.jukusoft.rpg.game.engine.exception.GameStateNotFoundException;%0A
 import c
@@ -216,16 +216,16 @@
 eState;%0A
-
 import c
@@ -280,16 +280,71 @@
 anager;%0A
+import com.jukusoft.rpg.game.gamestate.IntroGameState;%0A
 import c
@@ -737,24 +737,24 @@
 eManager) %7B%0A
-
         //%0A 
@@ -751,16 +751,400 @@
       //
+create and register new intro game state%0A        IntroGameState intro = new IntroGameState();%0A        stateManager.addGameState(%22intro%22, intro);%0A%0A        //push game state to activate game state --%3E set intro to active game state%0A        try %7B%0A            stateManager.pushGameState(%22intro%22);%0A        %7D catch (GameStateNotFoundException e) %7B%0A            e.printStackTrace();%0A        %7D
 %0A    %7D%0A%0A

integrate intro game state into main class.