Cleaned Data
Removed updatable
This commit is contained in:
@@ -27,7 +27,6 @@ import netwerkprog.game.util.data.Data;
|
|||||||
import netwerkprog.game.util.data.character.DamageData;
|
import netwerkprog.game.util.data.character.DamageData;
|
||||||
import netwerkprog.game.util.data.character.MoveData;
|
import netwerkprog.game.util.data.character.MoveData;
|
||||||
import netwerkprog.game.util.data.connection.NameData;
|
import netwerkprog.game.util.data.connection.NameData;
|
||||||
import netwerkprog.game.util.data.connection.ReadyData;
|
|
||||||
import netwerkprog.game.util.data.connection.TeamData;
|
import netwerkprog.game.util.data.connection.TeamData;
|
||||||
import netwerkprog.game.util.data.connection.TurnData;
|
import netwerkprog.game.util.data.connection.TurnData;
|
||||||
import netwerkprog.game.util.game.Faction;
|
import netwerkprog.game.util.game.Faction;
|
||||||
|
|||||||
@@ -6,36 +6,6 @@ import com.badlogic.gdx.backends.lwjgl.LwjglApplicationConfiguration;
|
|||||||
* custom application config class for the game
|
* custom application config class for the game
|
||||||
*/
|
*/
|
||||||
public class GameApplicationConfiguration extends LwjglApplicationConfiguration {
|
public class GameApplicationConfiguration extends LwjglApplicationConfiguration {
|
||||||
/**
|
|
||||||
* makes a new configuration with the given parameters
|
|
||||||
* @param width the width (in pixels)
|
|
||||||
* @param height the height (in pixels)
|
|
||||||
* @param fullscreen whether the app should run in fullscreen
|
|
||||||
*/
|
|
||||||
public GameApplicationConfiguration(int width, int height, boolean fullscreen) {
|
|
||||||
super();
|
|
||||||
super.width = width;
|
|
||||||
super.height = height;
|
|
||||||
super.fullscreen = fullscreen;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* makes a new configuration with the given parameters.
|
|
||||||
* No fullscreen
|
|
||||||
* @param width the width (in pixels)
|
|
||||||
* @param height the height (in pixels)
|
|
||||||
*/
|
|
||||||
public GameApplicationConfiguration(int width, int height) {
|
|
||||||
this(width,height,false);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* makes a new configuration with standard full hd width and height
|
|
||||||
*/
|
|
||||||
public GameApplicationConfiguration() {
|
|
||||||
this(1920,1080,false);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Makes a new configuration with the given parameters
|
* Makes a new configuration with the given parameters
|
||||||
* @param title the title of the window
|
* @param title the title of the window
|
||||||
@@ -61,13 +31,4 @@ public class GameApplicationConfiguration extends LwjglApplicationConfiguration
|
|||||||
public GameApplicationConfiguration(String title, int width, int height) {
|
public GameApplicationConfiguration(String title, int width, int height) {
|
||||||
this(title,width,height,false);
|
this(title,width,height,false);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Makes a new configuration with the given title
|
|
||||||
* the window will be 1920 x 1080 and fullscreen will be off
|
|
||||||
* @param title the window title
|
|
||||||
*/
|
|
||||||
public GameApplicationConfiguration(String title) {
|
|
||||||
this(title, 1920,1080);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +0,0 @@
|
|||||||
package netwerkprog.game.util.application;
|
|
||||||
|
|
||||||
public interface Updatable {
|
|
||||||
void update(double deltaTime);
|
|
||||||
}
|
|
||||||
@@ -7,25 +7,17 @@ public class Data implements Serializable {
|
|||||||
return 8000;
|
return 8000;
|
||||||
}
|
}
|
||||||
|
|
||||||
private String objectType;
|
private final String objectType;
|
||||||
private Data payload;
|
private Data payload;
|
||||||
|
|
||||||
public Data(String type) {
|
public Data(String type) {
|
||||||
this.objectType = type;
|
this.objectType = type;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setObjectType(String objectType) {
|
|
||||||
this.objectType = objectType;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setPayload(Data payload) {
|
public void setPayload(Data payload) {
|
||||||
this.payload = payload;
|
this.payload = payload;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getType() {
|
|
||||||
return objectType;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Data getPayload() {
|
public Data getPayload() {
|
||||||
return payload;
|
return payload;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
package netwerkprog.game.util.data.character;
|
package netwerkprog.game.util.data.character;
|
||||||
|
|
||||||
import netwerkprog.game.client.game.map.GameTile;
|
|
||||||
import netwerkprog.game.util.data.Data;
|
import netwerkprog.game.util.data.Data;
|
||||||
|
|
||||||
import java.awt.*;
|
import java.awt.*;
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ package netwerkprog.game.util.data.connection;
|
|||||||
import netwerkprog.game.util.data.Data;
|
import netwerkprog.game.util.data.Data;
|
||||||
|
|
||||||
public class NameData extends Data {
|
public class NameData extends Data {
|
||||||
private String name;
|
private final String name;
|
||||||
public NameData(String name) {
|
public NameData(String name) {
|
||||||
super("name");
|
super("name");
|
||||||
super.setPayload(this);
|
super.setPayload(this);
|
||||||
|
|||||||
@@ -1,15 +0,0 @@
|
|||||||
package netwerkprog.game.util.data.connection;
|
|
||||||
|
|
||||||
import netwerkprog.game.util.data.Data;
|
|
||||||
|
|
||||||
public class ReadyData extends Data {
|
|
||||||
private String username;
|
|
||||||
public ReadyData(String username) {
|
|
||||||
super("ready");
|
|
||||||
this.username = username;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getUsername() {
|
|
||||||
return username;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,7 +1,5 @@
|
|||||||
package netwerkprog.game.util.graphics;
|
package netwerkprog.game.util.graphics;
|
||||||
|
|
||||||
import netwerkprog.game.util.application.Updatable;
|
public interface Renderable {
|
||||||
|
|
||||||
public interface Renderable extends Updatable {
|
|
||||||
void render();
|
void render();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user