示例#1
0
 private void UpdateMachine(MachineBase machine, MachineBase nextMachine, DateTime currentDateTime)
 {
     machine.Update(currentDateTime);
     if (machine.CompleteEntityNumber > 0)
     {
         Entity entity = machine.YieldEntity();
         nextMachine.Accept(entity);
     }
 }
示例#2
0
 public void Update(DateTime currentDateTime)
 {
     if (_machines.Count >= 2)
     {
         for (int i = 0; i < _machines.Count - 1; i++)
         {
             MachineBase nextMachine = _machines[i + 1];
             UpdateMachine(_machines[i], nextMachine, currentDateTime);
         }
     }
 }