test 1 doc

Dependencies:   mbed Gamepad2

Engine/Engine.h

Committer:
joebarhouch
Date:
2020-05-26
Revision:
8:d19b30a6cd69
Parent:
7:530ca713d2b2
Child:
9:9830d3a78572

File content as of revision 8:d19b30a6cd69:

#ifndef ENGINE_H
#define ENGINE_H

#include "mbed.h"
#include "N5110.h"
#include "Gamepad.h"
#include "Player.h"
#include "Platform.h"
#include "Enemy.h"
#include <vector>

void drawMap(N5110 &lcd);

class Engine
{

public:
    Engine();
    ~Engine();

    void init();
    void read_input(Gamepad &pad);
    void update(Gamepad &pad);
    void draw(N5110 &lcd);
    void floorCollide();
    void spawnEnemy();
    void efloorCollide();
    void ennemyCollide();    

    
private:
    vector <Enemy> enemies;
    //player object
    Player _p;
    // player coordinates
    int _px;
    int _py;
    
    Vector2D player;
    
    //gamepad
    Direction _d;
    float _mag;
    
    //physics
    bool _jump;
    int _oldY;
    int _Ypos;
    bool _fall;
    bool _c;
    
    //enemy
    bool _efall;
    int _eYpos;
    bool _e;
    
    
};

#endif