Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed
Diff: Imposs/ImpossEngine.cpp
- Revision:
- 8:10eb578dd754
- Parent:
- 7:35465b3bf586
- Child:
- 9:e2dd152867d1
diff -r 35465b3bf586 -r 10eb578dd754 Imposs/ImpossEngine.cpp --- a/Imposs/ImpossEngine.cpp Mon May 18 14:28:05 2020 +0000 +++ b/Imposs/ImpossEngine.cpp Mon May 18 15:08:54 2020 +0000 @@ -27,7 +27,7 @@ _mag = pad.get_mag(); } -void ImpossEngine::draw(N5110 &lcd) +void ImpossEngine::draw(N5110 &lcd,Gamepad &pad) { // draw the elements in the LCD buffer // pitch @@ -41,7 +41,11 @@ _one.draw(lcd); } - _ball.update(_d); + if (level == 2){ + _two.draw(lcd); + } + + _ball.update(_d,pad); _ball.draw(lcd); @@ -73,7 +77,7 @@ bool collision = false; //check around ball to see if it has made contact with anything - while(i < 4){ + while(i < 3){ i++; @@ -87,7 +91,7 @@ i = 0; - while(i < 4){ + while(i < 3){ i++; @@ -101,7 +105,7 @@ i = 0; - while(i < 4){ + while(i < 3){ i++; @@ -115,7 +119,7 @@ i = 0; - while(i < 4){ + while(i < 3){ i++;