public void endGame()
    {
        if (!isServer)
        {
            return;
        }

        instance = null;

        for (int i = Network.connections.Length - 1; i > 1; i--)
        {
            Network.CloseConnection(Network.connections[i], false);
        }
        Network.Disconnect(0);
        this.StopMatchMaker();
        this.StopAllCoroutines();
        GameObject.Destroy(gameObject, 0);
        this.StopServer();
        this.StopHost();
    }
 private void Awake()
 {
     instance = this;
 }