SharpShooter
Dependencies: 4DGL-uLCD-SE SDFileSystem mbed-rtos mbed wave_player
Diff: MainGame.cpp
- Revision:
- 11:55b65415b6ba
- Parent:
- 10:92538c02e6c8
- Child:
- 12:2f358065ba3f
diff -r 92538c02e6c8 -r 55b65415b6ba MainGame.cpp --- a/MainGame.cpp Fri Oct 28 19:02:28 2016 +0000 +++ b/MainGame.cpp Fri Oct 28 20:07:38 2016 +0000 @@ -5,6 +5,9 @@ #include "wave_player.h" #include "Nav_Switch.h" #include "rtos.h" +#include "Obstacle.h" +#include "Shooter.h" +#include "Bullet.h" DigitalOut myled1(LED1); DigitalOut myled2(LED2); @@ -23,16 +26,16 @@ /*STRUCT INITIALIZATION*/ struct ObstLocation { int x1, y1, x2, y2; -} +}; struct TargetLocation { int x,y,r; -} - +}; +/* struct BulletLocation { int x, topY, bottomY; -} - +}; +*/ /*LOCAL VARIABLES*/ int numTries; int levelNum; @@ -59,10 +62,9 @@ numTries = 10; //draw header (level #, numTries) at the top - - createTargets(); - createObstacles(level); - createShooter(); + //createTargets(); + //createObstacles(level); + //createShooter(); } void createTargets() { @@ -73,7 +75,7 @@ void createShooter() { } - +/* void createObstacles(int num) { Obstacle obsArr[num]; obstaclePtr = new ObstLocation[num]; @@ -92,7 +94,7 @@ obstaclePtr[i] = obsArr[i].getLocation(); } } - +*/ void shoot() { } @@ -118,6 +120,9 @@ initializeLevel(currLevel); bool play = true; + wait(100); + + /* while (play) { //actual game play code //handle controls (5 tactile swtich) if(myNav.fire()) shoot(); @@ -128,7 +133,7 @@ } - + */