ELEC2645 (2019/20) / Mbed 2 deprecated ELEC2645_Project_el18lg

Dependencies:   mbed

Head/Head.h

Committer:
el18lg
Date:
2020-06-04
Revision:
9:f3259d652208
Parent:
5:e0f08e8022de

File content as of revision 9:f3259d652208:

#ifndef HEAD_H
#define HEAD_H

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

class Head
{
public:

    Head();
    ~Head();
    
    void init(int _x, int _y, int _length, int _speed);
    void draw(N5110 &lcd);
    void update();
    void read_input(Gamepad &pad);
    void update(Direction d,float mag);
    Vector2D get_pos();
    void set_velocity(Vector2D v);
    Vector2D get_velocity();
    Vector2D get_Direction();
    
    private:  
    Gamepad pad;
    Vector2D _velocity; 
    Vector2D _d;

     int _x;
     int _y;
     int _length;
     int _speed;

     };
#endif