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


            paddlePlayer2 = new PlayerPaddle(SceneManager.WindowWidth - 40, (int)(SceneManager.WindowHeight * 0.8));
            paddlePlayer2.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);
     paddlePlayer2 = new Player2Paddle(SceneManager.WindowWidth - 40, (int)(SceneManager.WindowHeight * 0.5), 255, 0, 0);
     paddlePlayer2.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;
 }