Changed paddle speed
This commit is contained in:
parent
ee23f2756a
commit
a0a70d69ed
@ -1219,4 +1219,4 @@ void initialiseBricks(brick *bricks, int *brickCount, int level) {
|
||||
*brickCount = 112;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -11,7 +11,7 @@
|
||||
#include "include/utilityFunctions.h"
|
||||
|
||||
void updatePaddle(Uint32 tickrate, paddle *thePaddle, char moveX, int winWidth, int winHeight) {
|
||||
thePaddle->x += moveX * 0.5 * tickrate;
|
||||
thePaddle->x += moveX * 0.3 * tickrate;
|
||||
if (thePaddle->x < 0 - (thePaddle->width / 2)) thePaddle->x = 0 - (thePaddle->width / 2);
|
||||
if (thePaddle->x > winWidth - (thePaddle->width / 2)) thePaddle->x = winWidth - (thePaddle->width / 2);
|
||||
}
|
||||
@ -143,4 +143,4 @@ void updateBall(Uint32 tickrate, ball *theBall, paddle *thePaddle, int winWidth,
|
||||
theBall->x = thePaddle->x - (double)(winWidth / 2) + (thePaddle->width) / 2;
|
||||
theBall->y = 26 - (double)(winHeight / 2);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user