コード例 #1
0
 public void HandleInput(
     Vector2 touchPoint,
     GameOrchestrator orchestrator)
 {
     if (_rateMeDialog.ShouldShowDialog)
     {
         _rateMeDialog.HandleInput(touchPoint);
     }
     else
     {
         if (_playDrawingInfos.HitBox((int)_playTextSize.X, (int)_playTextSize.Y)
             .Contains(touchPoint))
         {
             orchestrator.SetGameState();
         }
         else if (_fartDrawingInfos.HitBox((int)_fartTextSize.X, (int)_fartTextSize.Y)
                  .Contains(touchPoint))
         {
             _soundManager.PlayFart();
         }
         else if (_scoreDrawingInfos.HitBox((int)_scoreTextSize.X, (int)_scoreTextSize.Y)
                  .Contains(touchPoint))
         {
             orchestrator.SetScoreState();
         }
         else if (_aboutDrawingInfos.HitBox((int)_aboutTextSize.X, (int)_aboutTextSize.Y)
                  .Contains(touchPoint))
         {
             orchestrator.SetAboutState();
         }
     }
 }
コード例 #2
0
 public void HandleInput(Vector2 touchPoint)
 {
     if (_rateMeDialog.ShouldShowDialog)
     {
         _rateMeDialog.HandleInput(touchPoint);
     }
     else // Per non far sì che si possano premere i pulsanti sotto gli altri
     {
         _playButton.HandleInput(touchPoint);
         _aboutButton.HandleInput(touchPoint);
     }
 }