示例#1
0
        //上船
        public void GetOnBoat(CharacterController charactrl, BoatController boatCtrl)
        {
            //船控制器
            int index = boatCtrl.GetEmptyIndex();

            boatCtrl.boat.passenger[index] = charactrl;
            //人物控制器
            charactrl.character.Coast = null;
            charactrl.character.Role.transform.parent = boatCtrl.boat._Boat.transform;
            charactrl.character.IsOnBoat = true;
        }
示例#2
0
 //下船
 public void GetOffBoat(string passenger_name, BoatController boatCtrl)
 {
     for (int i = 0; i < boatCtrl.boat.passenger.Length; ++i)
     {
         if (boatCtrl.boat.passenger[i] != null &&
             boatCtrl.boat.passenger[i].character.Name == passenger_name)
         {
             boatCtrl.boat.passenger[i] = null;
         }
     }
 }
示例#3
0
 //船移动
 public void boatMove(BoatController boatCtrl)
 {
     if (boatCtrl.boat.Location == Location.left)
     {
         boatCtrl.boat.mScript.SetDestination(boatCtrl.boat.departure);
         boatCtrl.boat.Location = Location.right;
     }
     else
     {
         boatCtrl.boat.mScript.SetDestination(boatCtrl.boat.destination);
         boatCtrl.boat.Location = Location.left;
     }
 }
示例#4
0
 public void GetOnBoat(BoatController boatCtrl)
 {
     character.Coast = null;
     character.Role.transform.parent = boatCtrl.boat._Boat.transform;
     character.IsOnBoat = true;
 }