Beispiel #1
0
 public static void SafeInvoke <T>(this UnityEvent <T> unityEvent, T param)
 {
     if (!unityEvent.IsAssigned())
     {
         return;
     }
     unityEvent?.Invoke(param);
 }
Beispiel #2
0
 public static void SafeInvoke(this UnityEvent unityEvent)
 {
     if (!unityEvent.IsAssigned())
     {
         return;
     }
     unityEvent?.Invoke();
 }
Beispiel #3
0
 private void OnDied()
 {
     if (_onDied.IsAssigned())
     {
         _onDied.Invoke();
     }
     Died?.Invoke(this);
 }