Example #1
0
 private void LounchBall()
 {
     if (gameSession.isPlayerStart())
     {
         //GetComponent<Rigidbody2D>().velocity = new Vector2(xPush, yPush);
         GetComponent <Rigidbody2D>().velocity = new Vector2(xPush, PlayerPrefersController.GetBallSpeed());
     }
     else
     {
         GetComponent <Rigidbody2D>().velocity = new Vector2(-xPush, -PlayerPrefersController.GetBallSpeed());
     }
 }
Example #2
0
    void Update()
    {
        computerPaddleSpeed = PlayerPrefersController.GetEnemySpeed();

        PaddleControl();
    }
Example #3
0
 public void EasyButton()
 {
     PlayerPrefersController.SetEnemySpeed(9f);
     PlayerPrefersController.SetBallSpeed(9f);
     SceneManager.LoadScene("Level 1");
 }
Example #4
0
 public void NormalButton()
 {
     PlayerPrefersController.SetEnemySpeed(18f);
     PlayerPrefersController.SetBallSpeed(16f);
     SceneManager.LoadScene("Level 1");
 }