Ejemplo n.º 1
0
 protected virtual void TriggerWhenAtLeast()
 {
     while (WhenAtLeastQueue.Count > 0 && Level >= WhenAtLeastQueue.Peek)
     {
         var whenAtLeast = WhenAtLeastQueue.Dequeue();
         whenAtLeast.Succeed();
     }
 }
Ejemplo n.º 2
0
        public virtual Event WhenAtLeast(double level)
        {
            var whenAtLeast = new Event(Environment);

            WhenAtLeastQueue.Enqueue(whenAtLeast, level);
            TriggerWhenAtLeast();
            return(whenAtLeast);
        }