Esempio n. 1
0
 public override TransportState Process(Transport transport)
 {
     if (transport.CanFinishUnloading())
     {
         transport.FinishUnloading();
         transport.ReturnToOrigin();
         return(Returning);
     }
     return(this);
 }
Esempio n. 2
0
 public override TransportState Process(Transport transport)
 {
     if (transport.IsAtDestination())
     {
         transport.ArriveAtRouteDestination();
         transport.StartUnloading();
         if (transport.CanFinishUnloading())
         {
             transport.FinishUnloading();
             transport.ReturnToOrigin();
             return(Returning);
         }
         else
         {
             return(Unloading);
         }
     }
     return(this);
 }