public SimplerTimer CallDelayed(int delayMillis, Action callback)
        {
            var timer = new SimplerTimer(delayMillis, 0, callback);

            AddTimer(timer);
            return(timer);
        }
        public SimplerTimer CallPeriodically(int delayMillis, Action callback)
        {
            var timer = new SimplerTimer(0, delayMillis, callback);

            AddTimer(timer);
            return(timer);
        }
 public SimplerTimer CallPeriodically(int delayMillis, Action callback)
 {
     var timer = new SimplerTimer(0, delayMillis, callback);
     AddTimer(timer);
     return timer;
 }
 public SimplerTimer CallDelayed(int delayMillis, Action callback)
 {
     var timer = new SimplerTimer(delayMillis, 0, callback);
     AddTimer(timer);
     return timer;
 }
 public void AddTimer(SimplerTimer timer)
 {
     AddMessage(() => m_timers.Add(timer));
 }
 public void RemoveTimer(SimplerTimer timer)
 {
     AddMessage(() => m_timers.Remove(timer));
 }
 public bool Equals(SimplerTimer obj)
 {
     // needs to be improved
     return obj.m_intervalMillis == m_intervalMillis && Equals(obj.m_action, m_action);
 }
Exemple #8
0
 private void OnMapJoined(PlayedCharacter character, Map map)
 {
     m_checkTimer = character.Bot.CallPeriodically(4 * 1000, CheckMonsters);
 }
Exemple #9
0
 public void RemoveTimer(SimplerTimer timer)
 {
     AddMessage(() => m_timers.Remove(timer));
 }
Exemple #10
0
 public void AddTimer(SimplerTimer timer)
 {
     AddMessage(() => m_timers.Add(timer));
 }
 public bool Equals(SimplerTimer obj)
 {
     // needs to be improved
     return(obj.m_intervalMillis == m_intervalMillis && Equals(obj.m_action, m_action));
 }