Initial publish

Dependencies:   mbed

Fork of el17dg by Dmitrijs Griskovs

Revision:
34:754915ce9de5
Parent:
33:c623c6d5ed16
Child:
35:172db1608332
--- a/game/player.h	Mon Apr 29 08:10:52 2019 +0000
+++ b/game/player.h	Tue Apr 30 19:24:41 2019 +0000
@@ -41,8 +41,8 @@
      */
     Player() {
         player_bounds.center.x = 5;
-        player_bounds.center.y = 8;
-        player_bounds.radius = 7;
+        player_bounds.center.y = 7;
+        player_bounds.radius = 5;
     
         blast_bounds.center.x = 0;
         blast_bounds.center.y = 1;
@@ -64,9 +64,7 @@
                     blasts[i].active = false;
                     GameGlobals::game_score -= 10;
                 }
-                lcd.setPixel(blasts[i].pos.x,   blasts[i].pos.y, 1);
-                lcd.setPixel(blasts[i].pos.x + 1, blasts[i].pos.y, 1);
-                lcd.setPixel(blasts[i].pos.x + 2, blasts[i].pos.y, 1);
+                drawSprite(blasts[i].pos, blast_sprite);
             }
         }
     }
@@ -115,7 +113,9 @@
         shipMovementLimits();
         draw();
     }
-    
+    /** 
+     * @brief Updates and draws player's ship and the force shield sprites. 
+     */
     void draw() {
         if (force_shield_check.forceShildActivate()){
             drawSpriteOnTop(pos, player_spaceship1_shield_sprite);