Beispiel #1
0
        void triggerActions()
        {
            // Actions might remove themselves as side effects, so we should first evaluate
            // all actions that should be run, then remove the ran actions if they are still
            // there.
            var toRun = actions.Where(t => t.ua((runAt, act, name) => {
                var shouldRun = timePassed >= runAt;
                return(shouldRun);
            })).ToList();

            foreach (var t in toRun)
            {
                t._2();
            }
            actions.RemoveWhere(toRun.Contains);
        }