public override void OnServerDisconnect(NetworkConnection conn)
    {
        NetworkServer.DestroyPlayersForConnection(conn);

        if (conn.lastError != NetworkError.Ok)
        {
            if (LogFilter.logError)
            {
                Debug.LogError("ServerDisconnected due to error: " + conn.lastError);
            }
        }

        currentGamemode = sgm.currentGamemode;
        Debug.Log("Yes");
        currentGamemode.handlePlayerLeft();
        base.OnServerDisconnect(conn);
    }
 public override void OnStopHost()
 {
     currentGamemode = sgm.currentGamemode;
     currentGamemode.handleStopHost();
     base.OnStopHost();
 }
Example #3
0
 public void ChangeGamemode(Assets.Scripts.IGamemode newGamemode)
 {
     currentGamemode = newGamemode;
     newGamemode.handleLoading();
 }
 // Use this for initialization
 void Start()
 {
     currentGamemode = sgm.currentGamemode;
 }
Example #5
0
 // Use this for initialization
 void Start()
 {
     currentGamemode = gameObject.GetComponent <LMSGameMode>();
     WRBrespawnTime  = 4f;
 }