Du kan inte välja fler än 25 ämnen
Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.
|
- 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;
- }
- }
|