示例#1
0
    /** 每帧间隔 */
    public void onFrame(int delay)
    {
        if (_configDic == null)
        {
            return;
        }

        if (!_timerRunnerDic.isEmpty())
        {
            foreach (TriggerActionRunner k in _timerRunnerDic)
            {
                tickRunnerTimer(k, delay);
            }
        }

        if (!_timerIntervalDic.isEmpty())
        {
            foreach (TriggerIntervalData k in _timerIntervalDic)
            {
                if (k.current > 0 && (k.current -= delay) <= 0)
                {
                    k.current = k.delay;                  //不累计

                    runTrigger(k.instance, null);
                }
            }
        }
    }
示例#2
0
        /** 检查http消息 */
        private static void onFrame(int delay)
        {
            if (!_httpRequestDic.isEmpty())
            {
                foreach (var v in _httpRequestDic)
                {
                    if (v.isDone())
                    {
                        v.preComplete();
                        _httpRequestDic.remove(v);
                    }
                    else
                    {
                        v.timeOut -= delay;

                        if (v.timeOut <= 0)
                        {
                            v.onTimeOut();
                            _httpRequestDic.remove(v);
                        }
                    }
                }
            }

            //socket

            // _socketDic.forEachS(v=>
            // {
            //  v.onFrame(delay);
            // });
        }
示例#3
0
    /// <summary>
    /// 刷新语言
    /// </summary>
    public static void refreshLanguage()
    {
        if (!_textSet.isEmpty())
        {
            I18NText[] keys = _textSet.getKeys();

            for (int i = keys.Length - 1; i >= 0; --i)
            {
                I18NText k;
                if ((k = keys[i]) != null)
                {
                    k.refreshLanguage();
                }
            }
        }
    }
示例#4
0
 /// <summary>
 /// Set是否为空
 /// </summary>
 public bool func_SetIsEmpty(TriggerExecutor e, TriggerArg a, SSet <object> map)
 {
     return(map.isEmpty());
 }