Skip to content
Snippets Groups Projects
Commit 2b8d40c4 authored by Petter Selfors Rølvåg's avatar Petter Selfors Rølvåg
Browse files

been busy

parent 06dcf518
Branches
No related tags found
1 merge request!8Dev
Showing
with 327 additions and 58 deletions
No preview for this file type
<component name="libraryTable">
<library name="Gradle: CheckersClient.core.core-1.0">
<CLASSES>
<root url="jar://$PROJECT_DIR$/core/build/libs/core-1.0.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</component>
\ No newline at end of file
File added
File added
......@@ -59,5 +59,7 @@ public class PlayerController {
public PlayerController getPlayerController(){ return this; }
public void leaveLobby(int id) { net.sendToServer(new cLobbyLeave(id)); }
public NetworkController getNetWorkController() { return net; }
}
......@@ -33,6 +33,14 @@ public class Lobby {
return name;
}
public int getMaxPlayers(){
return MAX_PLAYERS;
}
public ArrayList<Player> getPlayers(){
return players;
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
......
......@@ -36,7 +36,7 @@ public class Player {
this.indexAvatar = indexAvatar;
}
public int getPlayerAvatar(int indexAvatar){
public int getIndexAvatar(){
return this.indexAvatar;
}
......
......@@ -308,10 +308,12 @@ public class MenuView extends View{
outputLabel.setText("alphaFadeValue: " +alphaFadeValue);
if(alphaFadeValue >= 1){
startFadeFromBlankToWhite = false;
gvm.push(new LobbyView(gvm, playerController, assetManager, stage, skin));
gvm.push(new LobbyView(gvm, playerController, assetManager, stage, skin, availableAvatars));
}
}
if(playerController.getPlayer() != null){
stage.addActor(connectionBarGreenCircle);
connectionBarRedCircle.remove();
......
......@@ -17,9 +17,11 @@ public class PlayerAvatar extends Sprite {
private boolean reversed = false;
public PlayerAvatar(ArrayList<Texture> textureArray, Texture portrait, String name) {
super(textureArray.get(0));
this.textureArray = textureArray;
this.portrait = portrait;
this.name = name;
setTexture(textureArray.get(currentTexture));
}
public void updateTexture() {
......@@ -34,7 +36,8 @@ public class PlayerAvatar extends Sprite {
this.reversed = true;
}
}
//System.out.println("Updating texture. Current texture Int: " + currentTexture + " numOfTextures: " + textureArray.size());
setTexture(textureArray.get(currentTexture));
}
public ArrayList<Texture> getTextures() {
......
No preview for this file type
<component name="libraryTable">
<library name="Gradle: CheckersServer.core.core-1.0">
<CLASSES>
<root url="jar://$PROJECT_DIR$/core/build/libs/core-1.0.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</component>
\ No newline at end of file
......@@ -14,7 +14,7 @@ import java.util.ArrayList;
public class NetworkController {
private final int MAX_PLAYERS = 2;
private final int MAX_LOBBIES = 2;
private final int MAX_LOBBIES = 40;
private ArrayList<Player> players;
private ArrayList<Lobby> lobbies;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment