player 1
Dependencies: 4DGL-uLCD-SE PinDetect SparkfunAnalogJoystick mbed-rtos mbed SDFileSystem
Fork of 4180FinalLab by
Wireless 2 Player Pong game
Diff: ball.cpp
- Revision:
- 4:7da18e3c590b
- Parent:
- 3:591086e44bf9
- Child:
- 8:8cc2aa78348c
diff -r 591086e44bf9 -r 7da18e3c590b ball.cpp --- a/ball.cpp Sun Apr 24 01:23:28 2016 +0000 +++ b/ball.cpp Tue Apr 26 18:24:46 2016 +0000 @@ -6,7 +6,7 @@ diameter = size; } -void Ball::setVx(uint8_t newvx){ +void Ball::setVx(double newvx){ vx = newvx; } @@ -14,8 +14,8 @@ vxDir = dir; } -void Ball::setBaseVy(uint8_t baseVy){ - vy = baseVy; +void Ball::setVy(double newVy){ + vy = newVy; } void Ball::setVyDir(bool dir){ @@ -27,11 +27,11 @@ } uint8_t Ball::getX(){ - return x; + return (uint8_t)x; } uint8_t Ball::getY(){ - return y; + return (uint8_t)y; } uint8_t Ball::getFutureX(){