Example #1
0
 private bool GetClick()
 {
     if (EventSystem.current.IsPointerOverGameObject())
     {
         return(false);
     }
     if (Input.GetMouseButtonDown(0))
     {
         levelCreator.PlaceTile(RobuzzleUtilities.GetEmptyPositionUnderCursor(cam, levelCreator.grid));
         return(true);
     }
     else if (Input.GetMouseButtonDown(1))
     {
         levelCreator.DeleteTile(RobuzzleUtilities.GetTilePositionUnderCursor(cam, levelCreator.grid));
         Destroy(RobuzzleUtilities.GetGameObjectUnderCursor(cam));
         return(true);
     }
     return(false);
 }