Exemple #1
0
        private void ResetGame()
        {
            paddlePlayer = new PlayerPaddle(40, (int)(SceneManager.WindowHeight * 0.5));
            paddlePlayer.Init();

            paddleAI = new AIPaddle(SceneManager.WindowWidth - 40, (int)(SceneManager.WindowHeight * 0.5));
            paddleAI.Init();



            ball = new Ball((int)(SceneManager.WindowWidth * 0.5), (int)(SceneManager.WindowHeight * 0.5));
            ball.Init();
        }
 private void ResetGame()
 {
     paddlePlayer = new PlayerPaddle(40, (int)(SceneManager.WindowHeight * 0.5), 0, 43, 255);
     paddlePlayer.Init(false);
     paddleAI = new AIPaddle(SceneManager.WindowWidth - 40, (int)(SceneManager.WindowHeight * 0.5), 255, 0, 0);
     paddleAI.Init(false);
     ball = new Ball((int)(SceneManager.WindowWidth * 0.5), (int)(SceneManager.WindowHeight * 0.5));
     ball.Init();
     speedPowerUp = new SpeedPowerUp(-180, -180, 255, 255, 0);
     speedPowerUp.Init();
     lengthPowerUp = new LengthPowerUp(-180, -180, 0, 255, 0);
     lengthPowerUp.Init();
     powerUpSpawned       = false;
     player1SpeedEnabled  = false;
     player2SpeedEnabled  = false;
     player1LengthEnabled = false;
     player2LengthEnabled = false;
 }