whoops i write bad code

This commit is contained in:
LadyEbony 2020-08-21 23:07:08 -07:00
parent dad44ef0cf
commit 586098b3cf
3 changed files with 4 additions and 6 deletions

View File

@ -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;
}

View File

@ -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;
}
}

View File

@ -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 {