ELEC2645 (2019/20) / Mbed 2 deprecated ELEC2645_Project_el19zf

Dependencies:   mbed

Revision:
5:6774b7272e85
Parent:
4:b12a49f0b730
Child:
6:dce38fe4e092
--- a/shot/shot.h	Tue Apr 14 05:47:23 2020 +0000
+++ b/shot/shot.h	Tue Apr 14 06:39:11 2020 +0000
@@ -11,6 +11,12 @@
     @author Zeyu Feng
     @13 April 2020
    */
+struct shot_posandtype{
+    int x;
+    int y;
+    int type;
+    int dir;
+};
 
 class shot {
  
@@ -20,7 +26,7 @@
     //destructor
     ~shot();
     
-    void init();
+    void init(N5110 &lcd);
     
     int rand_dir();//random direction of shot
     
@@ -28,14 +34,14 @@
     
     void gen_shot();//3 types direction 
     
-    void shot_move();
+    void update(N5110 &lcd);
     
     void draw(N5110 &lcd);
     
     
 private:
     
-    std::vector<Vector2D> _p;
+    std::vector<shot_posandtype> _p;