public void MarkTermination(int seq)
    {
        if (!_broadcastStarted)
        {
            Debug.LogErrorFormat("[CoStats] error: invalid broadcast while coroutine '{0}' is being terminated, ignored.", seq);
            return;
        }

        if (!_activeCoroutines.Contains(seq))
        {
            Debug.LogErrorFormat("[CoStats] error: coroutine '{0}' is terminating but could not be found in '_activeCoroutines', ignored.", seq);
            return;
        }

        var termination = new CoroutineTermination(seq);

        termination.curFrame = Time.frameCount;

        _activities.Add(termination);
        _activeCoroutines.Remove(seq);
    }
示例#2
0
 public void MarkTermination(int seq)
 {
     if (!this._broadcastStarted)
     {
         Debug.LogErrorFormat("[CoStats] error: invalid broadcast while coroutine '{0}' is being terminated, ignored.", new object[1]
         {
             (object)seq
         });
     }
     else if (!this._activeCoroutines.Contains(seq))
     {
         Debug.LogErrorFormat("[CoStats] error: coroutine '{0}' is terminating but could not be found in '_activeCoroutines', ignored.", new object[1]
         {
             (object)seq
         });
     }
     else
     {
         CoroutineTermination coroutineTermination = new CoroutineTermination(seq);
         coroutineTermination.curFrame = Time.get_frameCount();
         this._activities.Add((CoroutineActivity)coroutineTermination);
         this._activeCoroutines.Remove(seq);
     }
 }