Zeyu Feng 201377605
Dependencies: mbed
On Minerva
Diff: main.cpp
- Revision:
- 4:b12a49f0b730
- Parent:
- 3:b8fbaefc496c
- Child:
- 5:6774b7272e85
--- a/main.cpp Sun Apr 12 12:56:49 2020 +0000 +++ b/main.cpp Tue Apr 14 05:47:23 2020 +0000 @@ -16,11 +16,14 @@ #include "N5110.h" #include "People.h" #include "PeopleEngine.h" +#include "shot.h" // objects Gamepad pad; N5110 lcd; PeopleEngine engine; +shot shot; + int main() { @@ -30,15 +33,23 @@ engine.init(); pad.init(); lcd.refresh(); + shot.gen_shot(); - //a infinite loop to control position of the people + //a infinite loop to control position of the people, update the game state while(1) { lcd.clear(); + // people engine.read_input(pad); engine.update(); engine.draw(lcd); + // shot + //shot.gen_shot(); + shot.draw(lcd); + shot.shot_move(); lcd.refresh(); - wait_ms(100); + printf("shot changes\n"); + wait_ms(100);//fps = 10 + } }