Meteor defense project

Dependencies:   N5110 mbed

GameEngine/GameEngine.h

Committer:
jasper0712
Date:
2017-04-14
Revision:
26:140515d80457
Parent:
25:edd6a95607b1
Child:
27:d4926f19c12a

File content as of revision 26:140515d80457:

#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(); //not yet started
    void bombAndShield(Gamepad &pad, N5110 &lcd);
    void updateArray();

    void init();
    void update(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
    
    
private:
    Weapon weap;
    Weapon _d1;
    Weapon _d2;
    Spawn spa;
    int drawit;
    
    
    
    
};

#endif