ELEC2645 (2019/20) / Mbed 2 deprecated ELEC2645_Project_el19zf

Dependencies:   mbed

Revision:
4:b12a49f0b730
Child:
5:6774b7272e85
diff -r b8fbaefc496c -r b12a49f0b730 shot/shot.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/shot/shot.h	Tue Apr 14 05:47:23 2020 +0000
@@ -0,0 +1,47 @@
+#ifndef SHOT_H
+#define SHOT_H
+
+#include "mbed.h"
+#include "Gamepad.h"
+#include "N5110.h"
+#include <vector>
+
+/** shot class
+    @set several kinds of shot and come from all around
+    @author Zeyu Feng
+    @13 April 2020
+   */
+
+class shot {
+ 
+public:  
+    //constructor
+    shot();
+    //destructor
+    ~shot();
+    
+    void init();
+    
+    int rand_dir();//random direction of shot
+    
+    int rand_type();//give a random number from 0 - 3
+    
+    void gen_shot();//3 types direction 
+    
+    void shot_move();
+    
+    void draw(N5110 &lcd);
+    
+    
+private:
+    
+    std::vector<Vector2D> _p;
+    
+    
+    
+};
+#endif
+    
+    
+    
+