merge with master
Squashed commit of the following: commitec0d0c3531Merge:cb2ef9015492cbAuthor: SemvdH <45453592+SemvdH@users.noreply.github.com> Date: Sat Jun 6 22:43:28 2020 +0200 Merge pull request #10 from SemvdH/Connections Connections commit15492cb91dAuthor: MickWerf <mickwerf@outlook.com> Date: Sat Jun 6 16:50:32 2020 +0200 Fixed test build issue commit4b7eaaa641Merge:9349e6cc07c860Author: MickWerf <mickwerf@outlook.com> Date: Sat Jun 6 16:47:59 2020 +0200 Merge branch 'master' into Connections * master: optimize imports fixed memory leaks made only possible to select own factions characters made character only able to move in some position added character squares he can move added stuff add square to selected character # Conflicts: # core/src/netwerkprog/game/client/MainGame.java # core/src/netwerkprog/game/util/game/GameCharacter.java commit9349e6ce48Author: MickWerf <mickwerf@outlook.com> Date: Sat Jun 6 16:42:44 2020 +0200 Finished Server/Client registration and communications commit3dbffa4ffbAuthor: MickWerf <mickwerf@outlook.com> Date: Sat Jun 6 15:44:53 2020 +0200 Finished server side registration. commitf942bbbc92Author: MickWerf <mickwerf@outlook.com> Date: Sat Jun 6 15:02:45 2020 +0200 Connections, Applied Data objects, removed parsers and Made genereric data handling
This commit is contained in:
@@ -18,10 +18,13 @@ import netwerkprog.game.client.game.characters.Agent;
|
||||
import netwerkprog.game.client.game.characters.Hacker;
|
||||
import netwerkprog.game.client.game.characters.Team;
|
||||
import netwerkprog.game.client.game.characters.abilities.BodySwap;
|
||||
import netwerkprog.game.client.game.connections.Client;
|
||||
import netwerkprog.game.client.game.map.GameInputProcessor;
|
||||
import netwerkprog.game.client.game.map.GameTile;
|
||||
import netwerkprog.game.client.game.map.Map;
|
||||
import netwerkprog.game.client.game.map.MapRenderer;
|
||||
import netwerkprog.game.util.data.Data;
|
||||
import netwerkprog.game.util.data.DataCallback;
|
||||
import netwerkprog.game.util.game.Faction;
|
||||
import netwerkprog.game.util.game.GameCharacter;
|
||||
import netwerkprog.game.util.graphics.FrameRate;
|
||||
@@ -29,7 +32,7 @@ import netwerkprog.game.util.graphics.TextRenderer;
|
||||
|
||||
import java.awt.*;
|
||||
|
||||
public class MainGame extends ApplicationAdapter {
|
||||
public class MainGame extends ApplicationAdapter implements DataCallback {
|
||||
SpriteBatch batch;
|
||||
float screenWidth;
|
||||
float screenHeight;
|
||||
@@ -106,7 +109,7 @@ public class MainGame extends ApplicationAdapter {
|
||||
// playSong();
|
||||
|
||||
|
||||
// connectToServer();
|
||||
connectToServer();
|
||||
}
|
||||
|
||||
public void initCharacters() {
|
||||
@@ -155,7 +158,7 @@ public class MainGame extends ApplicationAdapter {
|
||||
|
||||
|
||||
private void connectToServer() {
|
||||
client = new Thread(new Client("localhost"));
|
||||
client = new Thread(new Client("localhost", this));
|
||||
try {
|
||||
client.start();
|
||||
} catch (Exception e) {
|
||||
@@ -285,4 +288,8 @@ public class MainGame extends ApplicationAdapter {
|
||||
return team;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDataReceived(Data data) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user