Add game start for server and client
This commit is contained in:
parent
f466f5ad52
commit
012c0e49a0
@ -69,10 +69,11 @@ public class MenuPanel extends JPanel {
|
||||
|
||||
final int index = menuList.getSelectedIndex();
|
||||
switch (index) {
|
||||
case 0:
|
||||
GameCanvas canvas = new GameCanvas();
|
||||
case 0: // Create sever
|
||||
case 1: // Join client
|
||||
GameCanvas canvas = new GameCanvas(index == 0);
|
||||
Main.getInstance().switchLayout(canvas);
|
||||
canvas.start();
|
||||
new Thread(canvas).start();
|
||||
break;
|
||||
case 4:
|
||||
System.exit(0);
|
||||
|
Loading…
Reference in New Issue
Block a user