} //this holds a list of all players that have successfully loaded the game scene/map and ready to play public void AddNetworkClient(NetworkPlayer_Mirror newPlayer) //add new player { if (isServer == false || GameManager.HostFactionID != factionID) //make sure that this is the server { return; } NetworkFactionManager_Mirror.NetworkPlayers.Add(newPlayer); }
public void CmdSendGameSceneReadyMessage(int readyFactionID) { factionID = readyFactionID; NetworkPlayer_Mirror newPlayer = new NetworkPlayer_Mirror(gameMgr, factionID); //create new instance of the Network Client class for the client that just got the game scene ready HostFactionMgr.AddNetworkClient(newPlayer); //register the client on the ready clients' list on the server/host's component HostFactionMgr.OnClientGameSceneReady(); //inform the server/host that one of the player's scene is now ready }