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:
@@ -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;
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
package netwerkprog.game.client.controllers;
|
||||
|
||||
import netwerkprog.game.util.Controller;
|
||||
|
||||
public class GrapicsController extends Controller {
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
package netwerkprog.game.client.controllers;
|
||||
|
||||
import netwerkprog.game.util.Controller;
|
||||
|
||||
public class SessionController extends Controller {
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
package netwerkprog.game.server.controllers;
|
||||
|
||||
import netwerkprog.game.util.Controller;
|
||||
|
||||
public class SessionController extends Controller {
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
package netwerkprog.game.server.controllers.game;
|
||||
|
||||
import netwerkprog.game.util.Controller;
|
||||
|
||||
public class CharacterController extends Controller {
|
||||
}
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
package netwerkprog.game.server.controllers.game;
|
||||
|
||||
import netwerkprog.game.util.Controller;
|
||||
|
||||
public class ObjectController extends Controller {
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
package netwerkprog.game.server.controllers.game;
|
||||
|
||||
import netwerkprog.game.util.Controller;
|
||||
|
||||
public class ScoreController extends Controller {
|
||||
}
|
||||
5
core/src/netwerkprog/game/util/Controller.java
Normal file
5
core/src/netwerkprog/game/util/Controller.java
Normal file
@@ -0,0 +1,5 @@
|
||||
package netwerkprog.game.util;
|
||||
|
||||
public abstract class Controller {
|
||||
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
package netwerkprog.game;
|
||||
package netwerkprog.game.util;
|
||||
|
||||
import com.badlogic.gdx.Gdx;
|
||||
import com.badlogic.gdx.graphics.OrthographicCamera;
|
||||
@@ -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
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user