예제 #1
0
 public ActionWorker(Func <ILockable> lockDelegate, ILocation location, ILocker locker, IScheduler scheduler, IDbManager dbManager, RequirementFormula requirementFormula)
 {
     this.locker             = locker;
     this.scheduler          = scheduler;
     this.dbManager          = dbManager;
     this.requirementFormula = requirementFormula;
     Location     = location;
     LockDelegate = lockDelegate;
 }
예제 #2
0
 public Error Validate(IGameObject obj, IEnumerable <Effect> effects, RequirementFormula requirementFormula)
 {
     foreach (var req in list)
     {
         var   parms = new object[] { obj, effects, req.Parms, Id };
         Error error;
         if ((error = (Error)req.Method.Invoke(requirementFormula, parms)) != Error.Ok)
         {
             return(error);
         }
     }
     return(Error.Ok);
 }