![](/media/cache/group/default_image.jpg.50x50_q85.jpg)
Adam Baker 201166301
Dependencies: mbed Gamepad N5110
Diff: main.cpp
- Revision:
- 11:dcb38924d96b
- Parent:
- 10:a37a4d2c09e7
- Child:
- 12:1253afc5d536
--- a/main.cpp Sun Mar 24 18:37:12 2019 +0000 +++ b/main.cpp Sun Mar 24 20:03:50 2019 +0000 @@ -26,16 +26,15 @@ lcd.clear(); - //lcd.drawCircle(move.x,move.y,3,FILL_BLACK); - ani.standing(move.x, move.y, lcd); - - - move = runner.nextLevel(move); //must happen befofre 'fall' otherwise runner can fall out of screen - - runner.whatLevel(move, lcd); - float speed = runner.getSpeed(pad); + //lcd.drawCircle(move.x,move.y,3,FILL_BLACK); + runner.runnerState(move, lcd, speed); + + move = runner.nextLevel(move); //must happen befofre 'fall' otherwise runner can fall out of screen + + runner.whatLevel(move, lcd); + move = runner.buttonPress(move, lcd, pad); move = runner.jump(move, lcd); @@ -50,14 +49,16 @@ move = runner.fall(move, lcd); + runner.runnerState(move, lcd, speed); //what state runner is in (must come after next level /**char buffer[14]; sprintf(buffer,"%i",move.l); lcd.printString(buffer,0,1); */ + char buffer1[14]; - sprintf(buffer1,"%i",move.gp); + sprintf(buffer1,"%i",move.f); lcd.printString(buffer1,0,0);