Ikenna Adrian Ozoemena 201157039

Dependencies:   mbed

Committer:
ikenna1
Date:
Wed May 08 09:22:16 2019 +0000
Revision:
41:e1fa36c0492e
Parent:
39:7824f9080f59
Child:
42:ee13e1d103d8
Child:
43:500b8cff3715
Increased lore and cleaned code in preparation for documentation

Who changed what in which revision?

UserRevisionLine numberNew contents of line
ikenna1 17:e65a9f981834 1 #ifndef HEALTH_H
ikenna1 17:e65a9f981834 2 #define HEALTH_H
ikenna1 17:e65a9f981834 3
ikenna1 17:e65a9f981834 4 #include "mbed.h"
ikenna1 17:e65a9f981834 5 #include "N5110.h"
ikenna1 17:e65a9f981834 6 #include "Gamepad.h"
ikenna1 17:e65a9f981834 7
ikenna1 17:e65a9f981834 8
ikenna1 17:e65a9f981834 9 class Health
ikenna1 17:e65a9f981834 10 {
ikenna1 17:e65a9f981834 11
ikenna1 17:e65a9f981834 12 public:
ikenna1 17:e65a9f981834 13 Health();
ikenna1 17:e65a9f981834 14 ~Health();
ikenna1 17:e65a9f981834 15 // enter default position,size of ship and its shape that will change depending on ship
ikenna1 17:e65a9f981834 16 void init(int shipno);
ikenna1 27:f99249e727fd 17 void draw_health(N5110 &lcd, int shipno);
ikenna1 17:e65a9f981834 18 void draw_shields(N5110 &lcd);
ikenna1 17:e65a9f981834 19 // Updates the ships position when its x and y position are entered
ikenna1 28:6319e928f0aa 20 void update(int bars,Gamepad &pad);
ikenna1 28:6319e928f0aa 21 Vector2D get_hp();
ikenna1 39:7824f9080f59 22 void seekerh_update(int seno,int dmg);
ikenna1 36:c25417f0d150 23 void shooterh_update(int shno, int dmg);
ikenna1 39:7824f9080f59 24 int get_seekerh(int seno);
ikenna1 36:c25417f0d150 25 int get_shooterh(int shno);
ikenna1 39:7824f9080f59 26 void reset_seekerh(int seno);
ikenna1 36:c25417f0d150 27 void reset_shooterh(int shno);
ikenna1 36:c25417f0d150 28
ikenna1 17:e65a9f981834 29
ikenna1 17:e65a9f981834 30 private:
ikenna1 17:e65a9f981834 31 int _ship_health;
ikenna1 17:e65a9f981834 32 int _ship_shields;
ikenna1 17:e65a9f981834 33 int _shipno;
ikenna1 17:e65a9f981834 34 int _health_unit;
ikenna1 41:e1fa36c0492e 35 int _seekerH[3];
ikenna1 41:e1fa36c0492e 36 int _shooterH[3];
ikenna1 39:7824f9080f59 37 int _seeker1_h;
ikenna1 39:7824f9080f59 38 int _seeker2_h;
ikenna1 39:7824f9080f59 39 int _seeker3_h;
ikenna1 36:c25417f0d150 40 int _shooter1_h;
ikenna1 36:c25417f0d150 41 int _shooter2_h;
ikenna1 36:c25417f0d150 42 int _shooter3_h;
ikenna1 17:e65a9f981834 43
ikenna1 17:e65a9f981834 44 };
ikenna1 17:e65a9f981834 45
ikenna1 17:e65a9f981834 46 #endif