Пример #1
0
 private static void Invoke()
 {
     UnityEngine.MonoBehaviour component = current.component;
     if (component != null)
     {
         IInterpTimedEventReceiver receiver = component as IInterpTimedEventReceiver;
         try
         {
             receiver.OnInterpTimedEvent();
         }
         catch (Exception exception)
         {
             Debug.LogError("Exception thrown during catchup \r\n" + exception, component);
         }
     }
     else
     {
         Debug.LogWarning("A component implementing IInterpTimeEventReceiver was destroyed without properly calling InterpEvent.Remove() in OnDestroy!\r\n" + (!string.IsNullOrEmpty(current.tag) ? ("The tag was \"" + current.tag + "\"") : "There was no tag set"));
     }
     current.Dispose();
 }
Пример #2
0
 private static void Invoke()
 {
     UnityEngine.MonoBehaviour monoBehaviour = InterpTimedEvent.current.component;
     if (!monoBehaviour)
     {
         Debug.LogWarning(string.Concat("A component implementing IInterpTimeEventReceiver was destroyed without properly calling InterpEvent.Remove() in OnDestroy!\r\n", (!string.IsNullOrEmpty(InterpTimedEvent.current.tag) ? string.Concat("The tag was \"", InterpTimedEvent.current.tag, "\"") : "There was no tag set")));
     }
     else
     {
         IInterpTimedEventReceiver interpTimedEventReceiver = monoBehaviour as IInterpTimedEventReceiver;
         try
         {
             interpTimedEventReceiver.OnInterpTimedEvent();
         }
         catch (Exception exception)
         {
             Debug.LogError(string.Concat("Exception thrown during catchup \r\n", exception), monoBehaviour);
         }
     }
     InterpTimedEvent.current.Dispose();
 }