示例#1
0
 public void Set(TimerEventName name, float triggerTime, float deltaTime, Command command)
 {
     this.name        = name;
     this.triggerTime = triggerTime;
     this.deltaTime   = deltaTime;
     this.command     = command;
 }
示例#2
0
 public TimerEvent(TimerEventName name, Command command, float tTime, float dTime)
 {
     this.triggerTime = tTime;
     this.deltaTime   = dTime;
     this.command     = command;
     this.name        = name;
 }
示例#3
0
        public static TimerEvent Find(TimerEventName name)
        {
            TimerManager timerMan = TimerManager.GetInstance();

            return((TimerEvent)timerMan.BaseFind((DLink) new TimerEvent {
                name = name
            }));
        }
示例#4
0
 public TimerEvent()
     : base()
 {
     this.triggerTime = 1.0f;
     this.deltaTime   = 1.0f;
     this.command     = null;
     this.name        = TimerEventName.Uninitialized;
 }
示例#5
0
        public static void UpdateDelta(TimerEventName timerEventName)
        {
            TimerEvent pTimerEvent    = TimerManager.Find(timerEventName);
            float      newTriggerTime = pTimerEvent.triggerTime;
            float      newDeltaTime   = pTimerEvent.deltaTime - 0.05f;
            Command    cmd            = pTimerEvent.command;

            TimerManager.Remove(pTimerEvent);
        }
示例#6
0
        public static TimerEvent Add(TimerEventName name, float triggerTime, float deltaTime, Command command)
        {
            TimerManager timerMan   = TimerManager.GetInstance();
            TimerEvent   timerEvent = (TimerEvent)timerMan.BaseAdd();

            Debug.Assert(timerEvent != null);
            timerEvent.Set(name, triggerTime, deltaTime, command);
            timerMan.BaseInsertSorted(timerEvent);
            return(timerEvent);
        }