Ejemplo n.º 1
0
 /// <summary>
 /// 这个函数是线程安全的,只要一个物体注册了这个就可以被Update,并且激活整个引擎的Update
 /// </summary>
 /// <param name="sketchObject"></param>
 public void RegisterForNextUpdate(SketchObject sketchObject)
 {
     lock (_ReadyToUpdateObjectListLock)
     {
         if (!_ReadyToUpdateObjectList.Contains(sketchObject))
         {
             _ReadyToUpdateObjectList.Add(sketchObject);
         }
     }
     try
     {
         _UpdateSemaphore.Release();
     }
     catch (SemaphoreFullException)
     {
     }
 }
Ejemplo n.º 2
0
 /// <summary>
 /// SkiaObject will be completed destroy in next update
 /// </summary>
 /// <param name="sketchObject"></param>
 public void Destroy(SketchObject sketchObject)
 {
     throw new NotImplementedException();
 }