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/Bullets/Bullets.cpp
- Revision:
- 15:44d5cc33d389
- Parent:
- 14:3361879490b2
- Child:
- 21:be18f33da757
--- a/Entity/Bullets/Bullets.cpp Wed Apr 24 03:09:00 2019 +0000
+++ b/Entity/Bullets/Bullets.cpp Wed Apr 24 06:28:14 2019 +0000
@@ -11,7 +11,7 @@
sprite_size.width = 2;
sprite_size.height = 2;
sprite_size.offset_x = 0;
- sprite_size.offset_y = 0;
+ sprite_size.offset_y = 1;
direction = dir;
}
@@ -38,7 +38,7 @@
if (matrix_collision_test(position.x, position.y, 0)){
return true;
}
- else if ((!(0 < position.x < 84)) || (!(0 < position.y < 48))){
+ if ((0 > position.x) || (position.x > 84) || (0 > position.y) || (position.y > 48)){
return true;
}
return false;