test 1 doc

Dependencies:   mbed Gamepad2

Engine/Engine.h

Committer:
joebarhouch
Date:
2020-05-27
Revision:
9:9830d3a78572
Parent:
8:d19b30a6cd69
Child:
10:9317a62bd4d0

File content as of revision 9:9830d3a78572:

#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
    vector <bool> _efall;
    vector <int> _eYpos;


    bool _e;
    bool place;
    
    
};

#endif