Exemple #1
0
    void Start()
    {
        _interpolate = interpolateVertices;

        Reset();
        validator.StartAsReceiver(webRtcManager);
        validator.SetRequestCompleteCallBack(RequestComplete);
        validator.SetVerticesReceivedCallBack(VerticesReceived);
        webRtcManager.SetServerClosedCallBack(ServerClosed);
        Invoke("ConnectToChannel", 5.0f);
    }
Exemple #2
0
 /// <summary>
 /// Start as MeshSender support class
 /// </summary>
 public void StartAsSender(WebRTCManager manager, int range, int packSize)
 {
     webRTCManager = manager;
     areaRange     = range;
     packageSize   = packSize;
     webRTCManager.SetUserConnectedCallBack(UserConnected);
     webRTCManager.SetDataReceivedCallBack(DataReceivedAsSender);
     webRTCManager.SetServerClosedCallBack(ServerClosed);
     if (isTimerReady)
     {
         StartTimer();
     }
 }