Mortal Kombat Game ELEC2645
Dependencies: mbed N5110 ShiftReg Joystick
Diff: GameEngine.h
- Revision:
- 19:6c63e1dd7c85
- Parent:
- 18:22bda659c70a
diff -r 22bda659c70a -r 6c63e1dd7c85 GameEngine.h --- a/GameEngine.h Thu Apr 29 22:40:08 2021 +0000 +++ b/GameEngine.h Fri Apr 30 03:49:59 2021 +0000 @@ -10,16 +10,18 @@ public: GameEngine(); // function to initialize game - void init(N5110 &lcd, DigitalIn &buttonA, DigitalIn &buttonB, DigitalIn &buttonC); + void init(); void start(N5110 &lcd, DigitalIn &buttonA, DigitalIn &buttonB, DigitalIn &buttonC, DigitalIn &buttonD, AnalogIn &joy_v, AnalogIn &joy_h); void enemy_AI(N5110 &lcd); void game_over(N5110 &lcd); // to be updated: if enemy wins, print game over. if fighter wins, finish him + void draw_health_bars(N5110 &lcd); void set_fighter_health(int fighter_health); void set_enemy_health(int enemy_health); void reduce_f_health(int fighter_health); // function to reduce fighter health when hit void reduce_e_health(int enemy_health); // function to reduce enemy health when hit int get_fighter_health(); int get_enemy_health(); + int check_game_over(N5110 &lcd); // if game over, execute game over function private: int check_collision(N5110 &lcd, DigitalIn &buttonA, DigitalIn &buttonB, DigitalIn &buttonC);