JianWei Lee
/
project_game
Meteor defense project
GameEngine/GameEngine.h
- Committer:
- jasper0712
- Date:
- 2017-04-12
- Revision:
- 20:32f115462bbc
- Parent:
- 19:7ccbb19703f9
- Child:
- 21:e5585569a938
File content as of revision 20:32f115462bbc:
#ifndef GAMEENGINE_H #define GAMEENGINE_H #include "mbed.h" #include "N5110.h" #include "Gamepad.h" #include "Weapon.h" #include "Spawn.h" #define Rows 48 #define Cols 84 class GameEngine { public: GameEngine(); ~GameEngine(); void drawSpawn(N5110 &lcd); void drawLaserPlayer(Gamepad &pad, N5110 &lcd); void checkGameRule(N5110 &lcd); void gameWave(); void bombAndShield(Gamepad &pad, N5110 &lcd); int Array[Cols][Rows]; //this was Array1 (main) int Array2[Cols][Rows]; // secondary //this char array to differentiate the 4 different kind of spawn - a, b, c and d. char charArray[Cols][Rows]; //used as main array char charArray2[Cols][Rows]; //this was Array2 - secondary array void init(); void update(Gamepad &pad, N5110 &lcd); void whatever(Gamepad &pad, N5110 &lcd); private: Weapon weap; Weapon _d1; Weapon _d2; Spawn spa; int drawit; }; #endif