ELEC2645 (2018/19) / Mbed 2 deprecated el17aio

Dependencies:   mbed

Revision:
35:3341f2bd0408
Parent:
34:6d0786582d81
Child:
36:c25417f0d150
diff -r 6d0786582d81 -r 3341f2bd0408 RosenEngine/RosenEngine.h
--- a/RosenEngine/RosenEngine.h	Tue Apr 30 05:03:15 2019 +0000
+++ b/RosenEngine/RosenEngine.h	Fri May 03 09:41:53 2019 +0000
@@ -36,12 +36,18 @@
     //*** note: add ship width and ship heirgth in place of 6 and 9 to generalize arrays after they are finished
     
 private:
-    bool shooter_weapon_collision(int sh_no);
-    bool shooter_ship_collision(int sh_no);
-    bool seeker_ship_collision();
-    bool enemy_projectile_collision();
-    Vector2D shooter_projectile_collision();  
+    
     void score(int points);
+    bool check_collision(int xpos1, int ypos1,int width1,int height1,int xpos2, int ypos2,int width2,int height2);
+    bool check_collision1(int xpos1,int width1,int xpos2,int width2);
+    void test();
+    void seeker_ship_collision(Gamepad &pad);
+    void shooter_ship_collision(Gamepad &pad);
+    void shooterw_ship_collision(Gamepad &pad);
+    void kestrelw_seeker_collision(Gamepad &pad);
+    void imperionw_seeker_collision(Gamepad &pad);
+    void kestrelw_shooter_collision(Gamepad &pad);
+    void imperionw_shooter_collision(Gamepad &pad);
     
     // Variables
     Ship _ship;
@@ -78,4 +84,16 @@
 **** add in cheats
 **** 
 */
-#endif
\ No newline at end of file
+#endif
+/*
+bool RosenEngine::seeker_ship_collision()
+{
+    // Vector2D ship_pos = _ship.get_pos();
+    Vector2D seeker_pos = _enemy.get_seekerpos();
+    int seeker_xpos = seeker_pos.x, seeker_ypos = seeker_pos.y;
+    bool sscol;
+    sscol = check_collision(seeker_xpos,seeker_ypos,9,6,ship_xpos,ship_ypos,9,6);
+    return sscol;
+   
+}
+*/