Stick_Runner

Dependencies:   FXOS8700CQ Gamepad N5110 SDFileSystem mbed

Fork of Stick_Runner by Samrudh Sharma

Revision:
5:1bf7c83f86cc
Parent:
4:2fdafb53eac2
Child:
6:bf601a65cb27
--- a/Character/Character.cpp	Wed May 03 18:00:37 2017 +0000
+++ b/Character/Character.cpp	Thu May 04 09:50:18 2017 +0000
@@ -1,5 +1,3 @@
-
-
 #include "Character.h"
 
 
@@ -20,7 +18,7 @@
 {
      
    
-   //Drawing the character 
+     //Drawing the character 
      lcd.setPixel(charPosX,charPosY);
      lcd.setPixel(charPosX-1,charPosY);
      lcd.setPixel(charPosX+1,charPosY);
@@ -48,7 +46,7 @@
 }
 
 
-
+//Function to move the character using the joystick
 void Character::updateCharacter(Direction d,float mag)
 {
     _speed = int(mag*10.0f);  // scale is arbitrary, could be changed in future
@@ -139,7 +137,7 @@
     //Using the dimensions of the character we check if there any pixels near it 
     if(((charPosX-5<p.x)&&(charPosX+5>p.x))&&((charPosY-5<p.y)&&(charPosY+5>p.y)))
     {
-        //Updateing the status
+        //Updating the status
         charStatus = false;
     }
 }
@@ -147,7 +145,7 @@
 //Function to return the status of the character
 bool Character::getCharacterStatus()
 {
-    //Used to determine whether the character has been and hit and the game is over
+    //Used to determine whether the character has been and hit and charstatus returns false the game is over
     return charStatus;
     
 }