示例#1
0
 /// <summary>
 /// Scheduler事务管理器
 /// </summary>
 /// <param name="name">
 ///            事务调度管理器名称 </param>
 /// <param name="delay">
 ///            延迟时间(默认0) </param>
 /// <param name="removeTask">
 ///            是否删除已运行的任务 </param>
 /// <param name="sequence">
 ///            是否循环播放管理器中事务(此项为true,当前事务不完成不会进行下一个,若想同步进行可改为false) </param>
 public Scheduler(string name, long delay, bool removeTask, bool sequence)
 {
     this._loop_timer         = new LTimer(name, delay);
     this._removeSequenceTask = removeTask;
     this._forceWaitSequence  = sequence;
     this._closed             = false;
     _forceWaitSequence       = sequence;
 }
示例#2
0
 public virtual LTimer SetEquals(LTimer other)
 {
     this._delay = MathUtils.Max(other._delay, 0);
     this._maxNumberOfRepeats = MathUtils.Max(other._maxNumberOfRepeats, -1);
     this._speedFactor        = MathUtils.Max(other._speedFactor, LSystem.MIN_SECONE_SPEED_FIXED);
     this._repeats            = other._repeats;
     this._active             = other._active;
     this._completed          = other._completed;
     this._currentTick        = other._currentTick;
     this._numberOfTicks      = other._numberOfTicks;
     this._speedFactor        = other._speedFactor;
     return(this);
 }
示例#3
0
 public static LTimer GetInstance()
 {
     if (_instance == null)
     {
         lock (typeof(LTimer))
         {
             if (_instance == null)
             {
                 _instance = new LTimer("STATIC_TIME", 0);
             }
         }
     }
     return(_instance);
 }
示例#4
0
 public virtual LTimer ToTime()
 {
     return(LTimer.At(this));
 }
示例#5
0
 public static void FreeStatic()
 {
     _instance = null;
 }
示例#6
0
 public TimerProcess(LTimer t)
 {
     this.timer = t;
     this.SetProcessType(GameProcessType.Time);
 }
示例#7
0
 public Interval(string name, Duration d)
 {
     this._loop_timer = new LTimer(name, d);
 }
示例#8
0
 public Interval()
 {
     this._loop_timer = new LTimer(0L);
 }
示例#9
0
 public Interval(string name, long delay, int loopCount)
 {
     this._loop_timer = new LTimer(name, delay, loopCount);
 }
示例#10
0
 public Interval(long delay, int loopCount)
 {
     this._loop_timer = new LTimer(delay, loopCount);
 }
示例#11
0
 public Interval(string name, long delay)
 {
     this._loop_timer = new LTimer(name, delay);
 }
示例#12
0
 public Interval(Duration d)
 {
     this._loop_timer = new LTimer(d);
 }
示例#13
0
 public Interval(long delay)
 {
     this._loop_timer = new LTimer(delay);
 }