Player Library

Player.h

Committer:
ll14c4p
Date:
2017-05-04
Revision:
15:139ea93f06b8
Parent:
14:f2562b193023

File content as of revision 15:139ea93f06b8:

#ifndef PLAYER_H
#define PLAYER_H

#include "mbed.h"
#include "N5110.h"
#include "Gamepad.h"


class Player
{
    public:
    
    
    Player();
    ~Player();
    
    /** Initialise Player
    *
    *   This function initalises the player library.
    */
    void init();
    
    /** Draw
    *
    *   This function draws the Player sprite onto the screen at the specified coordinates.
    */
    void draw(N5110 &lcd);
    
    /** Update
    *
    *   This function updates the player sprite position on screen.
    */
    void update(Direction d,float mag);
    
    /** Get Position
    *
    *   This function obtains the coordinate of the top-left pixel in the player sprite.
    */
    Vector2D get_pos();
    

    private:
    int m;
    int _x;
    int _y;
    int _speed;

};
#endif