示例#1
0
    public static Wooroutine <T> Start <T> (IEnumerator routine)
    {
        var wr = new Wooroutine <T>(routine);

        StartInternal(wr);
        return(wr);
    }
示例#2
0
    public IEnumerator coCancel <T> (int numFrames, Wooroutine <T> routine)
    {
//		Debug.Log("start stop routine " + Time.frameCount);
        yield return(new WaitForFrames(1));

//		Debug.Log("stop at " + Time.frameCount);
        routine.Stop();
    }
示例#3
0
 public void CloseWebsocket()
 {
     if (listenRoutine != null)
     {
         WooroutineRunner.StopRoutine(listenRoutine);
     }
     if (_webSocketWoo != null)
     {
         if (_webSocketWoo.Completed)
         {
             _webSocketWoo.ReturnValue.Close();
         }
         else
         {
             _webSocketWoo.Stop();
             _webSocketWoo = null;
         }
     }
 }