ELEC2645 (2019/20) / Mbed 2 deprecated ELEC2645_Project_el19zf

Dependencies:   mbed

Revision:
10:02ab3324be6c
Parent:
9:62d6559f0d50
Child:
11:494cc44777fe
--- a/shot/shot.cpp	Sat May 09 08:27:07 2020 +0000
+++ b/shot/shot.cpp	Sun May 10 05:16:51 2020 +0000
@@ -62,7 +62,7 @@
 
 }
 
-void shot::gen_shot()
+void shot::init_shot()
 {
     _p.resize(_size);
     for(std::vector<shot_posandtype>::iterator i = _p.begin(); i < _p.end(); i++) {
@@ -132,5 +132,13 @@
     return _size;
 }
 
-
+void shot::gen_shot(int timer_flag){
+    if(get_size() < 30){
+            if(timer_flag == 1){
+                timer_flag = 0;
+                int size = get_size()+ 4;
+                set_size(size);
+            }
+    }
+}
     
\ No newline at end of file