Exemplo n.º 1
0
        public override void Run(float time)
        {
            //计算时间差
            float offsetTime = time - currentTime;

            if (offsetTime >= delayTime)
            {
                this.callBack(offsetTime - delayTime);
                TimeManager.Get().RemoveTimer(this);
            }
        }
Exemplo n.º 2
0
        public override void Run(float time)
        {
            //计算时间差
            float offsetTime = time - currentTime;

            //到达时间后自动移除该计时器
            if (offsetTime >= delayTime)
            {
                TimeManager.Get().RemoveTimer(this);
            }
            else
            {
                this.callBack(time);
            }
        }