ELEC2645 (2018/19) / Mbed 2 deprecated fy14lkaa

Dependencies:   mbed

Files at this revision

API Documentation at this revision

Comitter:
fy14lkaa
Date:
Sat Apr 27 16:21:34 2019 +0000
Parent:
61:b248d2c31b4f
Child:
63:5a33437d2267
Commit message:
added _bullet.update(); to update the bullet before checking collisions to be able to correct for it before updating the display.

Changed in this revision

SpaceInvadersEngine/SpaceInvadersEngine.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/SpaceInvadersEngine/SpaceInvadersEngine.cpp	Sat Apr 27 16:17:47 2019 +0000
+++ b/SpaceInvadersEngine/SpaceInvadersEngine.cpp	Sat Apr 27 16:21:34 2019 +0000
@@ -47,7 +47,8 @@
 
 void  SpaceInvadersEngine::update(Gamepad &pad)
 {
-    check_goal(pad); 
+    check_goal(pad);
+        _bullet.update();
 
     void SpaceInvadersEngine::update(Gamepad&pad) {
         _A1.update(_d,_mag);