Vous ne pouvez pas sélectionner plus de 25 sujets
Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.
|
- using System;
- using CI.WSANative.Dispatchers.Core;
- using UnityEngine;
-
- namespace CI.WSANative.Dispatchers
- {
- public static class WSANativeDispatcher
- {
- public static void Initialise()
- {
- if (WSANativeDispatcher._dispatcher == null)
- {
- WSANativeDispatcher._dispatcher = new GameObject("WSANativeDispatcher").AddComponent<WSADispatcher>();
- }
- }
-
- public static void Invoke(Action action)
- {
- if (WSANativeDispatcher._dispatcher != null)
- {
- WSANativeDispatcher._dispatcher.Enqueue(action);
- }
- }
-
- private static WSADispatcher _dispatcher;
- }
- }
|