Josh Davy / Mbed 2 deprecated Flip

Dependencies:   mbed el17jd

Player/Player.h

Committer:
joshdavy
Date:
2019-04-19
Revision:
8:21b6d4dbce44
Parent:
7:68e06dda79f7
Child:
9:96969b1c6bde

File content as of revision 8:21b6d4dbce44:

#ifndef PLAYER_H
#define PLAYER_H

#include "mbed.h"
#include "N5110.h"
#include "Gamepad.h"
#include "Bitmap.h"
#include "Sprite.h"
#include "Level.h"
#include "PlayerMap.h"

#define GRAVITY 2
/*Sprite Class*/

//extern N5110 lcd;

class Player : public Sprite{

public:
    Player();
    ~Player();
    void update(Gamepad &pad, Block blocks [],int number_of_blocks);
    void init(int height,int width,Vector2D pos);
    
    bool can_move_up(Block blocks [],int number_of_blocks);
    bool can_move_down(Block blocks [],int number_of_blocks);
    bool can_move_left(Block blocks [],int number_of_blocks);
    bool can_move_right(Block blocks [],int number_of_blocks);
    
private:
    int _orientation;
    int _direction;
};

#endif