コード例 #1
0
 private void GetOnFerry()
 {
     if (Ferry.CanCarTakeAction(this))
     {
         Console.WriteLine(string.Format("Car {0} get on the Ferry", Index));
         //Ferry.GetCarIn(this);
         CarState = CarEnum.OnFerry;
     }
     WaitForAccess();
 }
コード例 #2
0
 private void MoveFromFerry()
 {
     if (Ferry.CanCarTakeAction(this))
     {
         Console.WriteLine(string.Format("Car {0} get out of the Ferry", Index));
         //Ferry.GetCarOut(this);
     }
     else
     {
         WaitForAccess();
     }
 }