private void checkErrors()
 {
     if (CitaNetWrapper.hasError())
     {
         Debug.Log(CitaNetWrapper.getErrorMessage());
     }
 }
    public void initialize(int port, string serverAddress, bool retry)
    {
        retryInit = retry;
        if (initialized)
        {
            // clean up in case we had already initialized
            CitaNetWrapper.cleanUp();
        }

        this.port          = port;
        this.serverAddress = serverAddress;
        CitaNetWrapper.initialize(port, serverAddress);
        if (CitaNetWrapper.hasError())
        {
            Debug.Log(CitaNetWrapper.getErrorMessage());
            CitaNetWrapper.cleanUp();
        }
        else
        {
            initialized = true;
            flock.gameObject.SetActive(true);
        }
    }