made all classes for ServerStartGameMEssage serializiable
This commit is contained in:
@@ -71,4 +71,8 @@ public void update(float delta) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public NetworkSupport getNetwork(){
|
||||
return network;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,9 +2,7 @@
|
||||
|
||||
import com.jme3.network.*;
|
||||
import com.jme3.network.serializing.Serializer;
|
||||
import pp.mdga.game.Game;
|
||||
import pp.mdga.game.Player;
|
||||
import pp.mdga.game.Statistic;
|
||||
import pp.mdga.game.*;
|
||||
import pp.mdga.message.client.*;
|
||||
import pp.mdga.message.server.*;
|
||||
import pp.mdga.server.ServerGameLogic;
|
||||
@@ -138,6 +136,13 @@ private void initializeSerializables() {
|
||||
Serializer.registerClass(WaitPieceMessage.class);
|
||||
Serializer.registerClass(Player.class);
|
||||
Serializer.registerClass(Statistic.class);
|
||||
Serializer.registerClass(Board.class);
|
||||
Serializer.registerClass(Node.class);
|
||||
Serializer.registerClass(Piece.class);
|
||||
Serializer.registerClass(BonusNode.class);
|
||||
Serializer.registerClass(StartNode.class);
|
||||
Serializer.registerClass(PlayerData.class);
|
||||
Serializer.registerClass(HomeNode.class);
|
||||
}
|
||||
|
||||
private void registerListeners() {
|
||||
|
||||
@@ -106,13 +106,10 @@ private void tryHost() {
|
||||
try {
|
||||
Thread.sleep(1000);
|
||||
} catch (InterruptedException ignored) {
|
||||
// todo: implement
|
||||
}
|
||||
hostDialog.connectServerAsClient();
|
||||
try {
|
||||
Thread.sleep(1000);
|
||||
} catch (InterruptedException ignored) {
|
||||
// todo: implement
|
||||
while (hostDialog.getNetwork().isConnected()){
|
||||
int i = 2;
|
||||
}
|
||||
app.getModelSynchronize().setHost(port);
|
||||
//app.getAcousticHandler().playSound(MdgaSound.WRONG_INPUT);
|
||||
@@ -142,9 +139,8 @@ private void tryJoin() {
|
||||
app.getModelSynchronize().setName(startDialog.getName());
|
||||
joinDialog.setHostname(ip);
|
||||
joinDialog.connectToServer();
|
||||
try {
|
||||
Thread.sleep(1000);
|
||||
} catch (InterruptedException ignored) {
|
||||
while (!joinDialog.getNetwork().isConnected()){
|
||||
int i = 2;
|
||||
}
|
||||
app.getModelSynchronize().setJoin(ip, port);
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user