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:
- 23:5a8f75e93508
- Parent:
- 22:7abf4581bc9b
- Child:
- 26:abbc19edc5c1
diff -r 7abf4581bc9b -r 5a8f75e93508 Entity/Bullets/Bullets.cpp
--- a/Entity/Bullets/Bullets.cpp Thu Apr 25 05:53:30 2019 +0000
+++ b/Entity/Bullets/Bullets.cpp Thu Apr 25 23:15:44 2019 +0000
@@ -29,6 +29,11 @@
}
}
+void Bullets::take_damage(int damage)
+{
+ hp -= damage;
+}
+
int * Bullets::get_frame()
{
return (int *) bullets_sprite;