ExAction.cs 438 B

123456789101112131415161718192021222324
  1. using System;
  2. using UnityEngine;
  3. using System.Collections;
  4. using System.Collections.Generic;
  5. public static class ExAction
  6. {
  7. public static void SafeInvoke(this Action action)
  8. {
  9. if (action != null)
  10. {
  11. action.Invoke();
  12. }
  13. }
  14. public static void SafeInvoke(this Action<double> action, double arg)
  15. {
  16. if (action != null)
  17. {
  18. action.Invoke(arg);
  19. }
  20. }
  21. }