Meteor defense project

Dependencies:   N5110 mbed

GameEngine/GameEngine.h

Committer:
jasper0712
Date:
2017-04-23
Revision:
34:6ac9541d4c31
Parent:
32:580d74825810
Child:
36:2608622e5018

File content as of revision 34:6ac9541d4c31:

#ifndef GAMEENGINE_H
#define GAMEENGINE_H

#include "mbed.h"
#include "N5110.h"
#include "Gamepad.h"
#include "Weapon.h"
#include "Spawn.h"
#include "GUI.h"

#define Rows 48
#define Cols 84


class GameEngine
{
    
public:
    GameEngine();
    ~GameEngine();
    void drawSpawn(N5110 &lcd);
    void drawLaserPlayer(Gamepad &pad, N5110 &lcd);
    void checkGameRule(Gamepad &pad, N5110 &lcd);
    void gameWave(); //not yet started
    void bombAndShield(Gamepad &pad, N5110 &lcd);
    void updateArray();

    void init(int w);
    void update(Gamepad &pad, N5110 &lcd);
    void weapUpgrade(Gamepad &pad, N5110 &lcd);
    void startingMenu(Gamepad &pad, N5110 &lcd);
    void numberOfLife_leds(Gamepad &pad);
    
    int doneUpgrade;
    
    int Array[Cols][Rows]; //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]; //secondary array
    
    
    
private:
    Weapon weap;
    Weapon _d1;
    Weapon _d2;
    Spawn spa;
    GUI _gui;
    
    int drawit;
    int ledNumber;
    int NumberOfLife;
    
};

#endif