Пример #1
0
 //移动船,首先判断是否可以移动,以及船在哪一侧,接着将船移向相反的位置。
 public void MoveBoat()
 {
     if ((!isRuning) || moveController.GetIsMoving())
     {
         return;
     }
     if (boatRoleController.GetBoatModel().isRight)
     {
         moveController.SetMove(PositionModel.left_boat, boatRoleController.GetBoatModel().boat);
     }
     else
     {
         moveController.SetMove(PositionModel.right_boat, boatRoleController.GetBoatModel().boat);
     }
     boatRoleController.GetBoatModel().isRight = !boatRoleController.GetBoatModel().isRight;
 }
Пример #2
0
    public void MoveBoat()
    {
        if ((!isRuning) || moveController.GetIsMoving())
        {
            return;
        }

        if (boatController.GetBoatModel().OnRight)
        {
            moveController.SetMove(PositionModel.boat_on_left, boatController.GetBoatModel().boat);
        }
        else
        {
            moveController.SetMove(PositionModel.boat_on_right, boatController.GetBoatModel().boat);
        }

        boatController.GetBoatModel().OnRight = !boatController.GetBoatModel().OnRight;
    }
Пример #3
0
 //移动船
 public void MoveBoat()
 {
     //判断当前游戏是否在进行,同时是否有对象正在移动
     if ((!isRuning) || moveController.GetIsMoving())
     {
         return;
     }
     //判断船在左侧还是右侧
     if (boatRoleController.GetBoatModel().isRight)
     {
         moveController.SetMove(PositionModel.left_boat, boatRoleController.GetBoatModel().boat);
     }
     else
     {
         moveController.SetMove(PositionModel.right_boat, boatRoleController.GetBoatModel().boat);
     }
     //移动后,将船的位置取反
     boatRoleController.GetBoatModel().isRight = !boatRoleController.GetBoatModel().isRight;
 }
Пример #4
0
 public void MoveBoat()
 {
     if (!isRuning || moveController.GetIsMoving())
     {
         return;
     }
     if (boatRoleController.GetBoatModel().isRight)
     {
         moveController.SetMove(new Vector3(3, -0.3f, -30), boatRoleController.GetBoatModel().boat);
         leftPriestNum  += boatRoleController.GetBoatModel().priestNum;
         leftDevilNum   += boatRoleController.GetBoatModel().devilNum;
         rightPriestNum -= boatRoleController.GetBoatModel().priestNum;
         rightDevilNum  -= boatRoleController.GetBoatModel().devilNum;
     }
     else
     {
         moveController.SetMove(new Vector3(7.5f, -0.3f, -30), boatRoleController.GetBoatModel().boat);
         leftPriestNum  -= boatRoleController.GetBoatModel().priestNum;
         leftDevilNum   -= boatRoleController.GetBoatModel().devilNum;
         rightPriestNum += boatRoleController.GetBoatModel().priestNum;
         rightDevilNum  += boatRoleController.GetBoatModel().devilNum;
     }
     boatRoleController.GetBoatModel().isRight = !boatRoleController.GetBoatModel().isRight;
 }