Exemple #1
0
 void UpdateGame()
 {
     if (Input.GetMouseButtonDown(0))
     {
         body.velocity = Vector2.up * jumpForce;
         flappyAnim.Jump();
     }
     if (body.position.y < floor)
     {
         GameOver();
     }
     score.maxScore++;
     currentScore.UpdateScore();
 }