JianWei Lee
/
project_game
Meteor defense project
GameEngine/GameEngine.h@21:e5585569a938, 2017-04-12 (annotated)
- Committer:
- jasper0712
- Date:
- Wed Apr 12 19:38:06 2017 +0000
- Revision:
- 21:e5585569a938
- Parent:
- 20:32f115462bbc
- Child:
- 25:edd6a95607b1
bomb is fixed. Can start on spawn D or arrange everything into structs
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
jasper0712 | 4:4145abd09075 | 1 | #ifndef GAMEENGINE_H |
jasper0712 | 4:4145abd09075 | 2 | #define GAMEENGINE_H |
jasper0712 | 4:4145abd09075 | 3 | |
jasper0712 | 4:4145abd09075 | 4 | #include "mbed.h" |
jasper0712 | 4:4145abd09075 | 5 | #include "N5110.h" |
jasper0712 | 4:4145abd09075 | 6 | #include "Gamepad.h" |
jasper0712 | 4:4145abd09075 | 7 | #include "Weapon.h" |
jasper0712 | 4:4145abd09075 | 8 | #include "Spawn.h" |
jasper0712 | 4:4145abd09075 | 9 | |
jasper0712 | 4:4145abd09075 | 10 | #define Rows 48 |
jasper0712 | 4:4145abd09075 | 11 | #define Cols 84 |
jasper0712 | 4:4145abd09075 | 12 | |
jasper0712 | 4:4145abd09075 | 13 | |
jasper0712 | 4:4145abd09075 | 14 | class GameEngine |
jasper0712 | 4:4145abd09075 | 15 | { |
jasper0712 | 4:4145abd09075 | 16 | |
jasper0712 | 4:4145abd09075 | 17 | public: |
jasper0712 | 4:4145abd09075 | 18 | GameEngine(); |
jasper0712 | 4:4145abd09075 | 19 | ~GameEngine(); |
jasper0712 | 4:4145abd09075 | 20 | void drawSpawn(N5110 &lcd); |
jasper0712 | 5:c74bbdda06f4 | 21 | void drawLaserPlayer(Gamepad &pad, N5110 &lcd); |
jasper0712 | 10:926b1f89c4f1 | 22 | void checkGameRule(N5110 &lcd); |
jasper0712 | 21:e5585569a938 | 23 | void gameWave(); //not yet started |
jasper0712 | 14:064b8d7f348d | 24 | void bombAndShield(Gamepad &pad, N5110 &lcd); |
jasper0712 | 21:e5585569a938 | 25 | |
jasper0712 | 21:e5585569a938 | 26 | void init(); |
jasper0712 | 21:e5585569a938 | 27 | void update(Gamepad &pad, N5110 &lcd); |
jasper0712 | 21:e5585569a938 | 28 | |
jasper0712 | 20:32f115462bbc | 29 | int Array[Cols][Rows]; //this was Array1 (main) |
jasper0712 | 20:32f115462bbc | 30 | int Array2[Cols][Rows]; // secondary |
jasper0712 | 19:7ccbb19703f9 | 31 | //this char array to differentiate the 4 different kind of spawn - a, b, c and d. |
jasper0712 | 20:32f115462bbc | 32 | char charArray[Cols][Rows]; //used as main array |
jasper0712 | 20:32f115462bbc | 33 | char charArray2[Cols][Rows]; //this was Array2 - secondary array |
jasper0712 | 9:4c4d787c7a8b | 34 | |
jasper0712 | 4:4145abd09075 | 35 | private: |
jasper0712 | 5:c74bbdda06f4 | 36 | Weapon weap; |
jasper0712 | 17:53aedd20155a | 37 | Weapon _d1; |
jasper0712 | 17:53aedd20155a | 38 | Weapon _d2; |
jasper0712 | 4:4145abd09075 | 39 | Spawn spa; |
jasper0712 | 4:4145abd09075 | 40 | int drawit; |
jasper0712 | 13:38cbce17d7d7 | 41 | |
jasper0712 | 11:1c48fe71045c | 42 | |
jasper0712 | 9:4c4d787c7a8b | 43 | |
jasper0712 | 17:53aedd20155a | 44 | |
jasper0712 | 4:4145abd09075 | 45 | }; |
jasper0712 | 4:4145abd09075 | 46 | |
jasper0712 | 4:4145abd09075 | 47 | #endif |