Added util package for all mutual classes between server and client.

Added FrameRate and GameApplicationConfiguration to util package.
Added super class for controllers.
Added controllers package for server and client packages.
Added gamecontroller for server.
Added character, object and score controllers for server and create them on gamecontroller creation.
Added sessioncontroller for server and client.
Added graphicsController for client.
Removed unused imports.
This commit is contained in:
MickWerf
2020-05-11 14:32:22 +02:00
parent 2596b913fc
commit f56af5e3dd
12 changed files with 61 additions and 6 deletions

View File

@@ -4,13 +4,12 @@ import com.badlogic.gdx.ApplicationAdapter;
import com.badlogic.gdx.Files;
import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.audio.Music;
import com.badlogic.gdx.backends.lwjgl.audio.Mp3;
import com.badlogic.gdx.graphics.Color;
import com.badlogic.gdx.graphics.GL20;
import com.badlogic.gdx.graphics.Texture;
import com.badlogic.gdx.graphics.g2d.SpriteBatch;
import netwerkprog.game.client.Client;
import netwerkprog.game.server.Server;
import netwerkprog.game.util.FrameRate;
public class MainGame extends ApplicationAdapter {
SpriteBatch batch;

View File

@@ -0,0 +1,6 @@
package netwerkprog.game.client.controllers;
import netwerkprog.game.util.Controller;
public class GrapicsController extends Controller {
}

View File

@@ -0,0 +1,6 @@
package netwerkprog.game.client.controllers;
import netwerkprog.game.util.Controller;
public class SessionController extends Controller {
}

View File

@@ -0,0 +1,6 @@
package netwerkprog.game.server.controllers;
import netwerkprog.game.util.Controller;
public class SessionController extends Controller {
}

View File

@@ -0,0 +1,6 @@
package netwerkprog.game.server.controllers.game;
import netwerkprog.game.util.Controller;
public class CharacterController extends Controller {
}

View File

@@ -0,0 +1,16 @@
package netwerkprog.game.server.controllers.game;
import netwerkprog.game.util.Controller;
public class GameController extends Controller {
private final CharacterController characterController;
private final ObjectController objectController;
private final ScoreController scoreController;
public GameController() {
this.characterController = new CharacterController();
this.objectController = new ObjectController();
this.scoreController = new ScoreController();
}
}

View File

@@ -0,0 +1,6 @@
package netwerkprog.game.server.controllers.game;
import netwerkprog.game.util.Controller;
public class ObjectController extends Controller {
}

View File

@@ -0,0 +1,6 @@
package netwerkprog.game.server.controllers.game;
import netwerkprog.game.util.Controller;
public class ScoreController extends Controller {
}

View File

@@ -0,0 +1,5 @@
package netwerkprog.game.util;
public abstract class Controller {
}

View File

@@ -1,4 +1,4 @@
package netwerkprog.game;
package netwerkprog.game.util;
import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.graphics.OrthographicCamera;

View File

@@ -1,7 +1,6 @@
package netwerkprog.game;
package netwerkprog.game.util;
import com.badlogic.gdx.backends.lwjgl.LwjglApplicationConfiguration;
import com.badlogic.gdx.backends.lwjgl3.Lwjgl3ApplicationConfiguration;
/**
* custom application config class for the game

View File

@@ -2,7 +2,7 @@ package netwerkprog.game.desktop;
import com.badlogic.gdx.backends.lwjgl.LwjglApplication;
import netwerkprog.game.MainGame;
import netwerkprog.game.GameApplicationConfiguration;
import netwerkprog.game.util.GameApplicationConfiguration;
public class DesktopLauncher {
public static void main (String[] arg) {