ELEC2645 (2018/19) / Mbed 2 deprecated ll16o2l_ELEC2645

Dependencies:   mbed Gamepad

Revision:
3:aa82968b7a8e
Parent:
2:888634fff8ff
Child:
6:98ddf5eade49
--- a/DodgeEngine/DodgeEngine.h	Sat Apr 06 12:08:39 2019 +0000
+++ b/DodgeEngine/DodgeEngine.h	Thu Apr 25 15:08:52 2019 +0000
@@ -6,8 +6,14 @@
 #include "Gamepad.h"
 #include "Objects.h"
 #include "Player.h"
-#include "Stopwatch.h"
+#include "Health_Kit.h"
 
+/** 
+* @file DodgeEngine.h
+* @author Oliver Luong, University of Leeds
+* @brief Controls the functionality of the Dodge game 
+* @date 22/04/2019
+*/ 
 
 class DodgeEngine
 {
@@ -16,36 +22,57 @@
     DodgeEngine();
     ~DodgeEngine();
 
-    void init(int player_width,int player_height,int objetcs_size,int speed);
+    void init(int player_width,int player_height,int objetcs_size,int speed,int lives, int kit_size);
     void read_input(Gamepad &pad);
     void update(Gamepad &pad);
     void draw(N5110 &lcd);
+    void time(float time);
     int get_lose();
     
 private:
 
-    void check_wall_collision(Gamepad &pad);
-    void check_player_collisions(Gamepad &pad);
-    void print_scores(N5110 &lcd);
+    void check_wall_collision1(Gamepad &pad);
+    void check_wall_collision2(Gamepad &pad);
+    void check_wall_collision3(Gamepad &pad);
+    void check_wall_collision4(Gamepad &pad);
+    void check_player_collisions1(Gamepad &pad);
+    void check_player_collisions2(Gamepad &pad);
+    void check_player_collisions3(Gamepad &pad);
+    void check_player_collisions4(Gamepad &pad);
+    void check_player_health_kit_collison(Gamepad &pad); 
+    void life_up(Gamepad &pad);
+    void life_leds(Gamepad &pad);
     
-//   Paddle _p1;   ////CHANGE TO OBJETCS
-//   Paddle _p2;
-
+    void player_hit(Gamepad &pad);
+    void print_lives_time(N5110 &lcd);
+    
     Player _player;
-    Stopwatch _stopwatch;
      
     int _player_width;
     int _player_height;
     int _objects_size;
     int _speed;
     int lose;
-    int player_score;
+    int _lives;
+    
+    int l; //counter for loop
+    int n; //counter for loop
+    int m; //counter for loop
     
-    Objects _objects;
+    float _time;
+    
+    Objects _objects1;
+    Objects _objects2;
+    Objects _objects3;
+    Objects _objects4;
     
     Direction _d;
     float _mag;
-
+    
+    Health_Kit _health_kit;
+    int _kit_size;
+    bool collect;
+    bool used;
 };
 
 #endif
\ No newline at end of file