Esempio n. 1
0
 private static IEnumerator CoWaitCallback(WaitCallbackDelegate func)
 {
     bool wait = true;
     func(() => { wait = false; });
     // ReSharper disable once LoopVariableIsNeverChangedInsideLoop
     while (wait)
     {
         yield return null;
     }
 }
Esempio n. 2
0
 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;
     }
 }
Esempio n. 3
0
File: CWaitCo.cs Progetto: scris/_GS
    private static IEnumerator CoWaitCallback(WaitCallbackDelegate func)
    {
        bool wait = true;

        func(() =>
        {
            wait = false;
        });
        // ReSharper disable once LoopVariableIsNeverChangedInsideLoop
        while (wait)
        {
            yield return(null);
        }
    }
Esempio n. 4
0
    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);
        }
    }
Esempio n. 5
0
    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);
    }
Esempio n. 6
0
 public static Coroutine WaitCallback(WaitCallbackDelegate func)
 {
     return(CCosmosEngine.EngineInstance.StartCoroutine((IEnumerator)CoWaitCallback(func)));
 }
Esempio n. 7
0
 public static Coroutine WaitCallback(WaitCallbackDelegate func)
 {
     return CCosmosEngine.EngineInstance.StartCoroutine((IEnumerator)CoWaitCallback(func));
 }
Esempio n. 8
0
 public static Coroutine WaitCallback(Enum type, string subType, int count, WaitCallbackDelegate func)
 {
     return(KEngine.AppEngine.EngineInstance.StartCoroutine(CoWaitCallback(type, subType, count, func)));
 }
Esempio n. 9
0
 public static void AddListener(Enum type, WaitCallbackDelegate waitCallback)
 {
     AddListener(type, null, waitCallback);
 }
Esempio n. 10
0
 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);
 }
Esempio n. 11
0
 public static void AddListener(Enum type, WaitCallbackDelegate waitCallback)
 {
     AddListener(type, null, waitCallback);
 }
Esempio n. 12
0
 public static Coroutine WaitCallback(Enum type, string subType, int count, WaitCallbackDelegate func)
 {
     return CCosmosEngine.EngineInstance.StartCoroutine(CoWaitCallback(type, subType, count, func));
 }
Esempio n. 13
0
 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);
 }