You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

28 rivejä
599 B

  1. using System;
  2. using CI.WSANative.Dispatchers.Core;
  3. using UnityEngine;
  4. namespace CI.WSANative.Dispatchers
  5. {
  6. public static class WSANativeDispatcher
  7. {
  8. public static void Initialise()
  9. {
  10. if (WSANativeDispatcher._dispatcher == null)
  11. {
  12. WSANativeDispatcher._dispatcher = new GameObject("WSANativeDispatcher").AddComponent<WSADispatcher>();
  13. }
  14. }
  15. public static void Invoke(Action action)
  16. {
  17. if (WSANativeDispatcher._dispatcher != null)
  18. {
  19. WSANativeDispatcher._dispatcher.Enqueue(action);
  20. }
  21. }
  22. private static WSADispatcher _dispatcher;
  23. }
  24. }