示例#1
0
文件: Engine.cs 项目: knexer/Apophis
 public void Apply(Simulation sim, ResourceCollection resources)
 {
     if (resources.CanApplyNextCycle(OperatingCost))
     {
         resources.ApplyNextCycle(OperatingCost);
         resources.GetResource(ResourceType.Deflection).ChangeNextCycle += sim.MaxTime - sim.CurrentTime;
     }
 }
示例#2
0
 public void Apply(Simulation sim, ResourceCollection resources)
 {
     // Don't convert if some input is not present in sufficient quantity.
     if (!Effects.All(resources.CanApplyNextCycle))
     {
         return;
     }
     foreach (ResourceDelta effect in Effects)
     {
         resources.ApplyNextCycle(effect);
     }
 }