public static void UnsubscribeFromLoop(this ILooper iLooper) { LoopController loop = getLoop(); if (loop == null) { return; } loop.Unsubscribe(iLooper); }
public static void SubscribeToLoop(this ILooper iLooper) { LoopController loop = getLoop(); if (loop == null) { Debug.LogError("Could not find LoopController to subscribe to!"); return; } loop.Subscribe(iLooper); }
public Processor(ISettings settings = null, IControllerService controllerService = null, IConsoleService console = null, IArgumentProcessorService argumentProcessor = null, ILooper looper = null) { _settings = settings ?? new Settings(); _controllerService = controllerService ?? new ControllerService(); _console = console ?? new ConsoleService(); _argumentProcessor = argumentProcessor ?? new ArgumentProcessorService(); _looper = looper ?? new Looper(); }
public static void RemoveLooper(ILooper looper) { if (sInitilized && looper != null) { sInstance.mLoopers.Remove(looper); } #if UNITY_EDITOR else if (!sInitilized && Application.isPlaying) { RTLog.LogError(LogCat.Game, "MainThread not initialized."); } #endif }
public Worker(ILoggerFactory loggerFactory, ILooper looper) { _looper = looper; _logger = loggerFactory.CreateLogger <Worker>(); }
public void Unsubscribe(ILooper iLooper) { subscribers.Remove(iLooper); }
public void Subscribe(ILooper iLooper) { subscribers.Add(iLooper); iLooper.SetState(); }