JianWei Lee
/
project_game
Meteor defense project
GameEngine/GameEngine.h@36:2608622e5018, 2017-04-23 (annotated)
- Committer:
- jasper0712
- Date:
- Sun Apr 23 22:52:48 2017 +0000
- Revision:
- 36:2608622e5018
- Parent:
- 34:6ac9541d4c31
- Child:
- 37:45da88e36d1d
in the progress of making cannon
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 | 29:6632dd9c48d8 | 9 | #include "GUI.h" |
jasper0712 | 4:4145abd09075 | 10 | |
jasper0712 | 4:4145abd09075 | 11 | #define Rows 48 |
jasper0712 | 4:4145abd09075 | 12 | #define Cols 84 |
jasper0712 | 4:4145abd09075 | 13 | |
jasper0712 | 4:4145abd09075 | 14 | |
jasper0712 | 4:4145abd09075 | 15 | class GameEngine |
jasper0712 | 4:4145abd09075 | 16 | { |
jasper0712 | 4:4145abd09075 | 17 | |
jasper0712 | 4:4145abd09075 | 18 | public: |
jasper0712 | 4:4145abd09075 | 19 | GameEngine(); |
jasper0712 | 4:4145abd09075 | 20 | ~GameEngine(); |
jasper0712 | 4:4145abd09075 | 21 | void drawSpawn(N5110 &lcd); |
jasper0712 | 5:c74bbdda06f4 | 22 | void drawLaserPlayer(Gamepad &pad, N5110 &lcd); |
jasper0712 | 32:580d74825810 | 23 | void checkGameRule(Gamepad &pad, N5110 &lcd); |
jasper0712 | 21:e5585569a938 | 24 | void gameWave(); //not yet started |
jasper0712 | 14:064b8d7f348d | 25 | void bombAndShield(Gamepad &pad, N5110 &lcd); |
jasper0712 | 26:140515d80457 | 26 | void updateArray(); |
jasper0712 | 21:e5585569a938 | 27 | |
jasper0712 | 32:580d74825810 | 28 | void init(int w); |
jasper0712 | 21:e5585569a938 | 29 | void update(Gamepad &pad, N5110 &lcd); |
jasper0712 | 28:450ab72fabdc | 30 | void weapUpgrade(Gamepad &pad, N5110 &lcd); |
jasper0712 | 32:580d74825810 | 31 | void startingMenu(Gamepad &pad, N5110 &lcd); |
jasper0712 | 34:6ac9541d4c31 | 32 | void numberOfLife_leds(Gamepad &pad); |
jasper0712 | 26:140515d80457 | 33 | |
jasper0712 | 32:580d74825810 | 34 | int doneUpgrade; |
jasper0712 | 28:450ab72fabdc | 35 | |
jasper0712 | 28:450ab72fabdc | 36 | int Array[Cols][Rows]; //main |
jasper0712 | 20:32f115462bbc | 37 | int Array2[Cols][Rows]; // secondary |
jasper0712 | 19:7ccbb19703f9 | 38 | //this char array to differentiate the 4 different kind of spawn - a, b, c and d. |
jasper0712 | 20:32f115462bbc | 39 | char charArray[Cols][Rows]; //used as main array |
jasper0712 | 28:450ab72fabdc | 40 | char charArray2[Cols][Rows]; //secondary array |
jasper0712 | 28:450ab72fabdc | 41 | |
jasper0712 | 9:4c4d787c7a8b | 42 | |
jasper0712 | 25:edd6a95607b1 | 43 | |
jasper0712 | 4:4145abd09075 | 44 | private: |
jasper0712 | 5:c74bbdda06f4 | 45 | Weapon weap; |
jasper0712 | 17:53aedd20155a | 46 | Weapon _d1; |
jasper0712 | 17:53aedd20155a | 47 | Weapon _d2; |
jasper0712 | 4:4145abd09075 | 48 | Spawn spa; |
jasper0712 | 29:6632dd9c48d8 | 49 | GUI _gui; |
jasper0712 | 28:450ab72fabdc | 50 | |
jasper0712 | 4:4145abd09075 | 51 | int drawit; |
jasper0712 | 32:580d74825810 | 52 | int ledNumber; |
jasper0712 | 34:6ac9541d4c31 | 53 | int NumberOfLife; |
jasper0712 | 13:38cbce17d7d7 | 54 | |
jasper0712 | 36:2608622e5018 | 55 | int fireInTheHole_flag; |
jasper0712 | 36:2608622e5018 | 56 | |
jasper0712 | 4:4145abd09075 | 57 | }; |
jasper0712 | 4:4145abd09075 | 58 | |
jasper0712 | 4:4145abd09075 | 59 | #endif |