Exemplo n.º 1
0
    public void GameInvoke_Stop(string name)
    {
        if (!_InvokeList.ContainsKey(name))
        {
            return;
        }

        StopCoroutine(_InvokeList[name]);
        _InvokeList.Remove(name);
        delayExecute = null;
    }
Exemplo n.º 2
0
    IEnumerator Execute(LuaExecute func, float delay, object param, string name)
    {
        yield return(new WaitForSeconds(delay));

        if (name != "")
        {
            _InvokeList.Remove(name);
        }
        func(param);
        yield return(null);
    }
Exemplo n.º 3
0
    public void GameInvoke(float delay, object param, string name)
    {
        if (delayExecute == null)
        {
            return;
        }

        if (name != "")
        {
            if (_InvokeList.ContainsKey(name))
            {
                StopCoroutine(_InvokeList[name]);
                _InvokeList.Remove(name);
            }
            _InvokeList.Add(name, StartCoroutine(Execute(delayExecute, delay, param, name)));
        }
        else
        {
            StartCoroutine(Execute(delayExecute, delay, param, name));
        }

        delayExecute = null;
    }