JianWei Lee
/
project_game
Meteor defense project
Diff: main.cpp
- Revision:
- 4:4145abd09075
- Parent:
- 3:6b50fe9d3848
- Child:
- 5:c74bbdda06f4
--- a/main.cpp Wed Mar 22 15:01:06 2017 +0000 +++ b/main.cpp Wed Mar 22 15:19:20 2017 +0000 @@ -3,6 +3,7 @@ #include "Gamepad.h" #include "Weapon.h" #include "Spawn.h" +#include "GameEngine.h" #define PI 3.14159265 //Y rows and X columns @@ -11,10 +12,11 @@ N5110 lcd(PTC9,PTC0,PTC7,PTD2,PTD1,PTC11); Gamepad pad; +GameEngine game; Weapon weap; -Spawn spa; + -int gamefps = 1; +int gamefps = 15; void init(); void render(); @@ -23,9 +25,7 @@ init(); while (true) { - spa.randomizeSpawn(); - spa.moveSpawn(); - spa.updateSpawn( lcd); + game.drawSpawn(lcd); weap.drawWeapon(pad, lcd);