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 MotionSensor
Diff: Entity/Player/Player.cpp
- Revision:
- 40:cbcbf6fc1421
- Parent:
- 37:a404860171a9
- Child:
- 41:0697508a28ba
diff -r 0c2521949429 -r cbcbf6fc1421 Entity/Player/Player.cpp
--- a/Entity/Player/Player.cpp Tue May 07 09:43:36 2019 +0000
+++ b/Entity/Player/Player.cpp Tue May 07 12:42:12 2019 +0000
@@ -138,7 +138,6 @@
void Player::draw(N5110 &lcd)
{
draw_player(lcd);
- draw_bullets(lcd);
}
void Player::draw_player(N5110 &lcd)
@@ -150,10 +149,10 @@
get_frame());
}
-void Player::draw_bullets(N5110 &lcd)
+void Player::draw_bullets(N5110 &lcd, int j)
{
for (int i = 0; i < bullets_max; i++) {
- if (valid_bullets[i]) {
+ if ((valid_bullets[i]) && (bullets_array[i]->get_pos_y() == j)) {
bullets_array[i]->draw(lcd);
}
}