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
Fork of el17dg by
Diff: game/player.h
- Revision:
- 26:676874c42883
- Parent:
- 25:749f1efc31fc
- Child:
- 27:f05f4e738ba9
--- a/game/player.h Wed Apr 03 12:46:04 2019 +0000
+++ b/game/player.h Sat Apr 06 20:13:33 2019 +0000
@@ -36,6 +36,7 @@
if (blasts[i].pos.x >= screen_width){
blasts[i].active = false;
game_score -= 10;
+ score_count_for_difficulty -= 50;
}
lcd.setPixel(blasts[i].pos.x, blasts[i].pos.y, 1);
lcd.setPixel(blasts[i].pos.x+1, blasts[i].pos.y, 1);
@@ -91,6 +92,7 @@
int max_player_y = game_area_y + game_area_height - spaceship1_height;
if (player.pos.x > max_player_x) player.pos.x = max_player_x;
if (player.pos.y > max_player_y) player.pos.y = max_player_y;
+ lcd.drawSpriteOnTop(player.pos.x, player.pos.y, spaceship1_width, spaceship1_height, (int *)spaceShip1);
}
};
#endif
\ No newline at end of file
