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
Diff: Health/Health.h
- Revision:
- 17:e65a9f981834
- Child:
- 18:2cc6898de6b2
diff -r e81a8f6868f1 -r e65a9f981834 Health/Health.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Health/Health.h Sat Apr 13 08:28:01 2019 +0000 @@ -0,0 +1,30 @@ +#ifndef HEALTH_H +#define HEALTH_H + +#include "mbed.h" +#include "N5110.h" +#include "Gamepad.h" + + +class Health +{ + +public: + Health(); + ~Health(); + // enter default position,size of ship and its shape that will change depending on ship + void init(int shipno); + void draw_health(N5110 &lcd); + void draw_shields(N5110 &lcd); + // Updates the ships position when its x and y position are entered + void update_hp(int bars); + +private: + int _ship_health; + int _ship_shields; + int _shipno; + int _health_unit; + +}; + +#endif \ No newline at end of file