whoops i write bad code
This commit is contained in:
parent
dad44ef0cf
commit
586098b3cf
|
@ -186,11 +186,8 @@ public static class PlayerProperties {
|
||||||
|
|
||||||
if (players.Count < 2) return false;
|
if (players.Count < 2) return false;
|
||||||
|
|
||||||
var hashset = new HashSet<int>();
|
|
||||||
foreach(var p in players){
|
foreach(var p in players){
|
||||||
var pid = playerCharacter.Get(p);
|
if (!lobbyStatus.Get(p)) return false;
|
||||||
if (pid == -1) return false;
|
|
||||||
if (!hashset.Add(pid)) return false;
|
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -113,6 +113,7 @@ public class GameTransition : MonoBehaviour {
|
||||||
state = GameState.Multiplayer;
|
state = GameState.Multiplayer;
|
||||||
break;
|
break;
|
||||||
case ExitGames.Client.Photon.LoadBalancing.ClientState.Joined:
|
case ExitGames.Client.Photon.LoadBalancing.ClientState.Joined:
|
||||||
|
if (state != GameState.InGame && state != GameState.Continue)
|
||||||
state = GameState.Lobby;
|
state = GameState.Lobby;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -57,7 +57,7 @@ public class LobbySetup : MonoBehaviour {
|
||||||
PlayerProperties.playerCharacter.SetLocal(1);
|
PlayerProperties.playerCharacter.SetLocal(1);
|
||||||
GameBoardInstance.instance.player2.authorityID = p2.ID;
|
GameBoardInstance.instance.player2.authorityID = p2.ID;
|
||||||
}
|
}
|
||||||
var pready = PlayerProperties.lobbyStatus.Get(p1);
|
var pready = PlayerProperties.lobbyStatus.Get(p2);
|
||||||
readyCheck2.localRotation = Quaternion.RotateTowards(readyCheck1.localRotation, pready ? Quaternion.identity : Quaternion.Euler(0f, 0f, 45f), delta);
|
readyCheck2.localRotation = Quaternion.RotateTowards(readyCheck1.localRotation, pready ? Quaternion.identity : Quaternion.Euler(0f, 0f, 45f), delta);
|
||||||
readyImage2.color = pready ? Color.green : Color.red;
|
readyImage2.color = pready ? Color.green : Color.red;
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue