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()); } }
void Update() { computerPaddleSpeed = PlayerPrefersController.GetEnemySpeed(); PaddleControl(); }
public void EasyButton() { PlayerPrefersController.SetEnemySpeed(9f); PlayerPrefersController.SetBallSpeed(9f); SceneManager.LoadScene("Level 1"); }
public void NormalButton() { PlayerPrefersController.SetEnemySpeed(18f); PlayerPrefersController.SetBallSpeed(16f); SceneManager.LoadScene("Level 1"); }