ELEC2645 (2019/20) / Mbed 2 deprecated ELEC2645_Project_el18lg

Dependencies:   mbed

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers Head.h Source File

Head.h

00001 #ifndef HEAD_H
00002 #define HEAD_H
00003 
00004 #include "mbed.h"
00005 #include "Gamepad.h"
00006 #include "N5110.h"
00007 
00008 class Head
00009 {
00010 public:
00011 
00012     Head();
00013     ~Head();
00014     
00015     void init(int _x, int _y, int _length, int _speed);
00016     void draw(N5110 &lcd);
00017     void update();
00018     void read_input(Gamepad &pad);
00019     void update(Direction d,float mag);
00020     Vector2D get_pos();
00021     void set_velocity(Vector2D v);
00022     Vector2D get_velocity();
00023     Vector2D get_Direction();
00024     
00025     private:  
00026     Gamepad pad;
00027     Vector2D _velocity; 
00028     Vector2D _d;
00029 
00030      int _x;
00031      int _y;
00032      int _length;
00033      int _speed;
00034 
00035      };
00036 #endif