Stick_Runner
Dependencies: FXOS8700CQ Gamepad N5110 SDFileSystem mbed
Fork of Stick_Runner by
Diff: Obstacles/Obstacles.cpp
- Revision:
- 2:98a41609c827
- Parent:
- 1:db9ff66f67c8
- Child:
- 3:0c690f1c04d8
diff -r db9ff66f67c8 -r 98a41609c827 Obstacles/Obstacles.cpp --- a/Obstacles/Obstacles.cpp Fri Apr 28 16:30:47 2017 +0000 +++ b/Obstacles/Obstacles.cpp Tue May 02 18:42:45 2017 +0000 @@ -12,7 +12,6 @@ void Obstacles::draw(N5110 &lcd) { - // draw Obstacless in screen buffer. //lcd.drawRect(obsPosX-4,obsPosY-3,3,3,FILL_BLACK); //lcd.drawLine(obsPosX-3, obsPosY-3,obsPosX-3,obsPosY+1,1); @@ -25,6 +24,13 @@ } + +void Obstacles::updateObstacle() +{ + obsPosY =obsPosY+1; + +} + void Obstacles::obstacleStatus(Vector2D p) { /* if(((p.x<obsPosX+3)&&(p.x>obsPosX-3))&&((p.y<obsPosY+3)&&(p.y>obsPosY-3))){ @@ -38,13 +44,6 @@ } } -void Obstacles::updateObstacle() -{ - obsPosY =obsPosY+1; - -} - - Vector2D Obstacles::getObstaclePos() {