Beispiel #1
0
 // Update is called once per frame
 protected new void Update()
 {
     if (Input.GetMouseButtonDown(0) && sceneController.status == 0)
     {
         Ray        ray = Camera.main.ScreenPointToRay(Input.mousePosition);
         RaycastHit hit;
         if (Physics.Raycast(ray, out hit))
         {
             if (hit.transform.tag == "Devil" || hit.transform.tag == "Priest")
             {
                 if (hit.transform.parent == sceneController.boat.transform)
                 {
                     offBoat = CCGetOffBoat.GetSSAction();
                     this.RunAction(hit.collider.gameObject, offBoat, this);
                 }
                 else
                 {
                     onBoat = CCGetOnBoat.GetSSAction();
                     this.RunAction(hit.collider.gameObject, onBoat, this);
                 }
             }
             else if (hit.transform.tag == "Boat" && sceneController.boatCapacity != 2)
             {
                 moveBoat = CCBoatMove.GetSSAction();
                 this.RunAction(hit.collider.gameObject, moveBoat, this);
             }
         }
     }
     base.Update();
 }
Beispiel #2
0
 // Update is called once per frame
 protected new void Update()
 {
     if (Input.GetMouseButtonDown(0) && sceneController.game == 0)
     {
         Ray        ray = Camera.main.ScreenPointToRay(Input.mousePosition);
         RaycastHit hit;
         if (Physics.Raycast(ray, out hit))
         {
             if (hit.transform.tag == "Devil" || hit.transform.tag == "Priest")
             {
                 if (hit.collider.gameObject == sceneController.boat[0] || hit.collider.gameObject == sceneController.boat[1])
                 {
                     if (hit.collider.gameObject == sceneController.boat[0])
                     {
                         getoffB = CCGetOffBoat.GetSSAction(0);
                         this.RunAction(hit.collider.gameObject, getoffB, this);
                     }
                     else
                     {
                         getoffB = CCGetOffBoat.GetSSAction(1);
                         this.RunAction(hit.collider.gameObject, getoffB, this);
                     }
                 }
                 else
                 {
                     getonA = CCGetOnTheBoat.GetSSAction();
                     this.RunAction(hit.collider.gameObject, getonA, this);
                 }
             }
             else if (hit.transform.tag == "Boat" && sceneController.boatCapacity != 2)
             {
                 print(hit.transform.tag);
                 boatmovingC = CCBoatMoveing.GetSSAction();
                 this.RunAction(hit.collider.gameObject, boatmovingC, this);
             }
         }
     }
     base.Update();
 }