And yea, any question you have i can help with, and there is a better way to make to ball bounce with control. To where the method in ball is detectPaddle(), instead of:
if (rightPaddle!= null)
{
deltaX = deltaX * (-1) - 1;
deltaY = deltaY - 1;
}
if (leftPaddle!= null)
{
deltaX = deltaX * (-1) + 1;
deltaY = deltaY + 1;
}
try:
if (rightPaddle!= null)
{
deltaX = -deltaX;
int offset = getY() - paddle.getY();
deltaY = deltaY + offset/10;
}
if (leftPaddle!= null)
{
deltaX = -deltaX;
int offset = getY() - paddle.getY();
deltaY = deltaY + offset/10;
}
it allows the player to control what way the ball will bounce by where the ball hits on the paddle
2013/5/21
Asteroids
2013/5/20
Super Crash Brothers
2013/5/20
Super Crash Brothers
2013/5/20
Super Crash Brothers
2013/5/20
Pong Soccer
2013/5/18
Asteroids
2013/5/17
Pong Soccer
2013/5/17
Pong Soccer
2013/5/17
Asteroids