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;
|
||||
|
||||
var hashset = new HashSet<int>();
|
||||
foreach(var p in players){
|
||||
var pid = playerCharacter.Get(p);
|
||||
if (pid == -1) return false;
|
||||
if (!hashset.Add(pid)) return false;
|
||||
if (!lobbyStatus.Get(p)) return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -113,7 +113,8 @@ public class GameTransition : MonoBehaviour {
|
|||
state = GameState.Multiplayer;
|
||||
break;
|
||||
case ExitGames.Client.Photon.LoadBalancing.ClientState.Joined:
|
||||
state = GameState.Lobby;
|
||||
if (state != GameState.InGame && state != GameState.Continue)
|
||||
state = GameState.Lobby;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -57,7 +57,7 @@ public class LobbySetup : MonoBehaviour {
|
|||
PlayerProperties.playerCharacter.SetLocal(1);
|
||||
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);
|
||||
readyImage2.color = pready ? Color.green : Color.red;
|
||||
} else {
|
||||
|
|
Loading…
Reference in New Issue