示例#1
0
        protected override EventResult OnElapsed(EventContext context, TimerElapsedEvent @event)
        {
            IEnumerable <ActorInstance> actorInstances = context.CurrentBoard.ActorInstanceLayer.ActorInstances.Where(arg => arg.ActorId == BoardsActor.ActorId);

            foreach (ActorInstanceRandomMoveCommand command in actorInstances.Select(arg => Commands.ActorInstanceRandomMove(arg)))
            {
                context.EnqueueCommand(command);
            }

            return(EventResult.Completed);
        }