]> git.localhorst.tv Git - sdl-test8.git/blobdiff - src/pong/Match.cpp
extracted some parts of the collision response for better readability
[sdl-test8.git] / src / pong / Match.cpp
index 5754b36c51c5b51564202d31619eddc3b920ff79..523c2fd6af6442220486a6bfb89827bc80e846f3 100644 (file)
@@ -34,8 +34,8 @@ Match::Match(void)
 , worldWidth(800)
 , worldHeight(480)
 , ball(10)
-, secondBall(7)
-, thirdBall(5)
+, secondBall(8)
+, thirdBall(7)
 , leftPaddle(10, 100)
 , rightPaddle(10, 100)
 , topWall(800, 10)
@@ -51,15 +51,15 @@ Match::Match(void)
        }
 
        ball.Translate(Entity::Vector(400, 240));
-       ball.Accelerate(Entity::Vector(180, 180));
+       ball.Accelerate(Entity::Vector(180, 180), 0);
 //     ball.SetMaxVelocity(500.0f);
 
        secondBall.Translate(Entity::Vector(300, 240));
-       secondBall.Accelerate(Entity::Vector(-50, -50), 1);
+       secondBall.Accelerate(Entity::Vector(-50, -50), -3);
 //     secondBall.SetMaxVelocity(600.0f);
 
        thirdBall.Translate(Entity::Vector(200, 440));
-       thirdBall.Accelerate(Entity::Vector(60, 40));
+       thirdBall.Accelerate(Entity::Vector(60, 40), 3);
 
        leftPaddle.Translate(Entity::Vector(5, 200));
        rightPaddle.Translate(Entity::Vector(795, 280));