Esempio n. 1
0
 public void SetInOutPoints()
 {
     if (inputMouseButtons.GetMouseButtonDown(1) && mouseBoundary.CurrentMouseOnMazeElement != null)
     {
         if (mouseBoundary.CurrentMouseOnMazeElement.tag != "PathFindStartNode" && mouseBoundary.CurrentMouseOnMazeElement.tag != "PathFindDestinationNode" && !mazeInOutController.IsPathFindStartPointAlreadySet())
         {
             mazeInOutController.SetInPoint(mouseBoundary.CurrentMouseOnMazeElement);
         }
         else if (mouseBoundary.CurrentMouseOnMazeElement.tag != "PathFindStartNode" &&
                  mouseBoundary.CurrentMouseOnMazeElement.tag != "PathFindDestinationNode" &&
                  mazeInOutController.IsPathFindStartPointAlreadySet() &&
                  !mazeInOutController.IsPathFindEndPointAlreadySet())
         {
             mazeInOutController.SetOutPoint(mouseBoundary.CurrentMouseOnMazeElement);
         }
         else if (mouseBoundary.CurrentMouseOnMazeElement.tag == "PathFindStartNode")
         {
             mazeInOutController.RemoveInPoint();
         }
         else if (mouseBoundary.CurrentMouseOnMazeElement.tag == "PathFindDestinationNode")
         {
             mazeInOutController.RemoveEndPoint();
         }
     }
 }
Esempio n. 2
0
 public void Update()
 {
     if (inputButtons.GetMouseButtonDown(0) && Mouse.CurrentMouseOnMazeElement != null)
     {
         mazeElementProcessing.FirstMazeElementBuildProcess();
     }
     else if (inputButtons.GetMouseButton(0) && Mouse.CurrentMouseOnMazeElement != null)
     {
         mazeElementProcessing.MazeElementInLineProcessing();
     }
     else if (inputButtons.GetMouseButtonUp(0))
     {
         mazeElementProcessing.MazeElementsFinalProcess();
     }
 }