ECE2035 class project

Dependencies:   4DGL-uLCD-SE SDFileSystem mbed wave_player

Fork of missile_command by ECE 2035 TA

Files at this revision

API Documentation at this revision

Comitter:
slin77
Date:
Mon Nov 17 13:53:14 2014 +0000
Parent:
2:d39a6a36e0c0
Child:
4:0dc720aa3c71
Commit message:
change trajectory of antimissiles

Changed in this revision

player.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/player.cpp	Mon Nov 17 13:15:34 2014 +0000
+++ b/player.cpp	Mon Nov 17 13:53:14 2014 +0000
@@ -184,13 +184,13 @@
                    if (am[i].y - 2 <= 0) {
                         //when the missile flies out of the screen
                         am[i].status = DEACTIVE;
-                        uLCD.line(am[i].x, am[i].y, am[i].x, am[i].y - 2, BACKGROUND_COLOR);
+                        uLCD.line(am[i].x, am[i].y, am[i].x, 100, BACKGROUND_COLOR);
                         am[i].y = current_player.y;
                         am[i].x = current_player.x;
                         current_player.am_remain++;
                            
                     } else if (am[i].tick % rate == 0) {
-                        uLCD.line(am[i].x, am[i].y, am[i].x, am[i].y - 2, BACKGROUND_COLOR);
+                        uLCD.line(am[i].x, am[i].y, am[i].x, 100, BACKGROUND_COLOR);
                         am[i].y = am[i].y - 2;
                     }
                     
@@ -202,7 +202,7 @@
     int i;
     for(i = 0; i < current_player.max_am;i++) {
         if (am[i].status == ACTIVE ) {
-            uLCD.line(am[i].x, am[i].y, am[i].x, am[i].y - 2, PLAYER_COLOR);
+            uLCD.line(am[i].x, am[i].y, am[i].x, 100, PLAYER_COLOR);
         }
     }
 }