Beispiel #1
0
 //下船
 private void GetOffBoat()
 {
     //根据开始岸的情况选择下船
     if ((fromPriestNum == 0 && fromDevilNum == 2) || (fromPriestNum == 0 && fromDevilNum == 0))
     {
         if (firstScene.boat.get_State() == -1) //对岸
         {
             foreach (var x in firstScene.boat.passenger)
             {
                 if (x != null)
                 {
                     firstScene.ObjectIsClicked(x);
                     break;
                 }
             }
             if (firstScene.boat.isEmpty())
             {
                 count = 0;
             }
         }
         else
         {
             count = 0;
         }
     }
     else if (((fromPriestNum == 0 && fromDevilNum == 1)) && firstScene.boat.get_State() == 1)
     {
         count = 0;
     }
     else
     {
         foreach (var x in firstScene.boat.passenger)
         {
             if (x != null && x.getType() == 1)
             {
                 firstScene.ObjectIsClicked(x);
                 count = 0;
                 break;
             }
         }
         if (count != 0)
         {
             foreach (var x in firstScene.boat.passenger)
             {
                 if (x != null)
                 {
                     firstScene.ObjectIsClicked(x);
                     count = 0;
                     break;
                 }
             }
         }
     }
 }