Example #1
0
 public void OnPointerClick()
 {
     if (!gameProxy.GetData().isBallRunning)
     {
         SendNotification(GameEvent.RUN_BALL);
     }
 }
 public void OnTriggerEnter()
 {
     if (gameProxy.GetData().isBallRunning)
     {
         gameProxy.ReduceLife();
     }
 }
 public override void HandleNotification(INotification notification)
 {
     switch (notification.Name)
     {
     case GameEvent.GAME_OVER:
         var score = gameProxy.GetData().score;
         if (leaderBoardProxy.IsScoreHigh(score) && score > 0)
         {
             highScorePopupView.Show(score);
         }
         else
         {
             SendNotification(GameEvent.LD_SHOW);
         }
         break;
     }
 }
Example #4
0
        private void UpdateUI()
        {
            var data = gameProxy.GetData();

            gameUIView.UpdateUI(data.lifes, data.score);
        }