Meteor defense project

Dependencies:   N5110 mbed

Committer:
jasper0712
Date:
Mon Apr 17 18:22:16 2017 +0000
Revision:
28:450ab72fabdc
Parent:
27:d4926f19c12a
Child:
29:6632dd9c48d8
now trying to connect wu and weapon

Who changed what in which revision?

UserRevisionLine numberNew 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 28:450ab72fabdc 9 #include "WeaponUpgrades.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 10:926b1f89c4f1 23 void checkGameRule(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 21:e5585569a938 28 void init();
jasper0712 21:e5585569a938 29 void update(Gamepad &pad, N5110 &lcd);
jasper0712 28:450ab72fabdc 30 void weapUpgrade(Gamepad &pad, N5110 &lcd);
jasper0712 26:140515d80457 31
jasper0712 28:450ab72fabdc 32 int done;
jasper0712 28:450ab72fabdc 33
jasper0712 28:450ab72fabdc 34 int Array[Cols][Rows]; //main
jasper0712 20:32f115462bbc 35 int Array2[Cols][Rows]; // secondary
jasper0712 19:7ccbb19703f9 36 //this char array to differentiate the 4 different kind of spawn - a, b, c and d.
jasper0712 20:32f115462bbc 37 char charArray[Cols][Rows]; //used as main array
jasper0712 28:450ab72fabdc 38 char charArray2[Cols][Rows]; //secondary array
jasper0712 28:450ab72fabdc 39
jasper0712 9:4c4d787c7a8b 40
jasper0712 25:edd6a95607b1 41
jasper0712 4:4145abd09075 42 private:
jasper0712 5:c74bbdda06f4 43 Weapon weap;
jasper0712 17:53aedd20155a 44 Weapon _d1;
jasper0712 17:53aedd20155a 45 Weapon _d2;
jasper0712 4:4145abd09075 46 Spawn spa;
jasper0712 28:450ab72fabdc 47 WeaponUpgrades wu;
jasper0712 28:450ab72fabdc 48
jasper0712 4:4145abd09075 49 int drawit;
jasper0712 13:38cbce17d7d7 50
jasper0712 4:4145abd09075 51 };
jasper0712 4:4145abd09075 52
jasper0712 4:4145abd09075 53 #endif