private static IEnumerator CoWaitCallback(WaitCallbackDelegate func) { bool wait = true; func(() => { wait = false; }); // ReSharper disable once LoopVariableIsNeverChangedInsideLoop while (wait) { yield return null; } }
private static IEnumerator CoWaitCallback(Enum type, string subType, int count, WaitCallbackDelegate func) { bool wait = true; func(type, subType, count, () => { wait = false; }); // ReSharper disable once LoopVariableIsNeverChangedInsideLoop while (wait) { yield return null; } }
private static IEnumerator CoWaitCallback(WaitCallbackDelegate func) { bool wait = true; func(() => { wait = false; }); // ReSharper disable once LoopVariableIsNeverChangedInsideLoop while (wait) { yield return(null); } }
private static IEnumerator CoWaitCallback(Enum type, string subType, int count, WaitCallbackDelegate func) { bool wait = true; func(type, subType, count, () => { wait = false; }); // ReSharper disable once LoopVariableIsNeverChangedInsideLoop while (wait) { yield return(null); } }
public static void AddListener(Enum type, string subType, WaitCallbackDelegate waitCallback) { if (waitCallback == null) { Log.Error("[AddListener]waitCallback Cannnot null!"); return; } var key = MakeKey(type, subType); HashSet <WaitCallbackDelegate> emGentors; if (!Instance._actionRecordWaitCallback.TryGetValue(key, out emGentors)) { emGentors = Instance._actionRecordWaitCallback[key] = new HashSet <WaitCallbackDelegate>(); } emGentors.Add(waitCallback); }
public static Coroutine WaitCallback(WaitCallbackDelegate func) { return(CCosmosEngine.EngineInstance.StartCoroutine((IEnumerator)CoWaitCallback(func))); }
public static Coroutine WaitCallback(WaitCallbackDelegate func) { return CCosmosEngine.EngineInstance.StartCoroutine((IEnumerator)CoWaitCallback(func)); }
public static Coroutine WaitCallback(Enum type, string subType, int count, WaitCallbackDelegate func) { return(KEngine.AppEngine.EngineInstance.StartCoroutine(CoWaitCallback(type, subType, count, func))); }
public static void AddListener(Enum type, WaitCallbackDelegate waitCallback) { AddListener(type, null, waitCallback); }
public static void AddListener(Enum type, string subType, WaitCallbackDelegate waitCallback) { if (waitCallback == null) { CDebug.LogError("[AddListener]waitCallback Cannnot null!"); return; } var key = MakeKey(type, subType); HashSet<WaitCallbackDelegate> emGentors; if (!Instance._actionRecordWaitCallback.TryGetValue(key, out emGentors)) { emGentors = Instance._actionRecordWaitCallback[key] = new HashSet<WaitCallbackDelegate>(); } emGentors.Add(waitCallback); }
public static Coroutine WaitCallback(Enum type, string subType, int count, WaitCallbackDelegate func) { return CCosmosEngine.EngineInstance.StartCoroutine(CoWaitCallback(type, subType, count, func)); }
public static void UnBind(Enum type, string subType, WaitCallbackDelegate waitCallback) { var key = MakeKey(type, subType); HashSet<WaitCallbackDelegate> emGentors; if (!Instance._actionRecordWaitCallback.TryGetValue(key, out emGentors)) { emGentors = Instance._actionRecordWaitCallback[key] = new HashSet<WaitCallbackDelegate>(); } emGentors.Remove(waitCallback); }