ELEC2645 (2019/20) / Mbed 2 deprecated ELEC2645_Project_el18jkeo

Dependencies:   mbed

Revision:
3:8a140aa1ddcd
Parent:
2:c2316b659b97
Child:
4:18a1fc4c38e0
--- a/BulletS/BulletS.cpp	Sat Mar 14 20:52:07 2020 +0000
+++ b/BulletS/BulletS.cpp	Sat Mar 14 21:19:58 2020 +0000
@@ -1,15 +1,16 @@
-#include Bullet.h
+#include "BulletS.h"
+#include "Ship.cpp"
 
 Bullet::Bullet()
 {
 }
 
-void Bullet::init(int size, int speed, int x, int y)
-{ 
+void Bullet::init(int size, int speed)
+{   int ShipHeight = get_height();
     Size = size;
-    Speed = 0;
+    Speed = speed;
     X = WIDTH/2 - Size/2; //Middle of the ship
-    Y = HEIGHT - Height; //Top of the ship
+    Y = HEIGHT - ShipHeight; //Top of the ship
 }
 
 void Bullet::draw(N5110 &lcd)