ELEC2645 (2018/19) / Mbed 2 deprecated ll16o2l_ELEC2645

Dependencies:   mbed Gamepad

Committer:
ll16o2l
Date:
Sat Apr 06 12:08:39 2019 +0000
Revision:
2:888634fff8ff
Child:
3:aa82968b7a8e
Added stopwatch however still needs adjusting

Who changed what in which revision?

UserRevisionLine numberNew contents of line
ll16o2l 2:888634fff8ff 1 #ifndef Objects_H
ll16o2l 2:888634fff8ff 2 #define Objects_H
ll16o2l 2:888634fff8ff 3
ll16o2l 2:888634fff8ff 4 #include "mbed.h"
ll16o2l 2:888634fff8ff 5 #include "N5110.h"
ll16o2l 2:888634fff8ff 6 #include "Gamepad.h"
ll16o2l 2:888634fff8ff 7 #include "Player.h"
ll16o2l 2:888634fff8ff 8
ll16o2l 2:888634fff8ff 9 /** Ball Class
ll16o2l 2:888634fff8ff 10 @author Dr Craig A. Evans, University of Leeds
ll16o2l 2:888634fff8ff 11 @brief Controls the ball in the Pong game
ll16o2l 2:888634fff8ff 12 @date Febraury 2017
ll16o2l 2:888634fff8ff 13 */
ll16o2l 2:888634fff8ff 14 class Objects
ll16o2l 2:888634fff8ff 15 {
ll16o2l 2:888634fff8ff 16
ll16o2l 2:888634fff8ff 17 public:
ll16o2l 2:888634fff8ff 18 Objects();
ll16o2l 2:888634fff8ff 19 ~Objects();
ll16o2l 2:888634fff8ff 20 void init(int size,int speed);
ll16o2l 2:888634fff8ff 21 void draw(N5110 &lcd);
ll16o2l 2:888634fff8ff 22 void update();
ll16o2l 2:888634fff8ff 23 /// accessors and mutators
ll16o2l 2:888634fff8ff 24 void set_velocity(Vector2D v);
ll16o2l 2:888634fff8ff 25 Vector2D get_velocity();
ll16o2l 2:888634fff8ff 26 Vector2D get_pos();
ll16o2l 2:888634fff8ff 27 void set_pos(Vector2D p);
ll16o2l 2:888634fff8ff 28
ll16o2l 2:888634fff8ff 29 private:
ll16o2l 2:888634fff8ff 30
ll16o2l 2:888634fff8ff 31 Vector2D _velocity;
ll16o2l 2:888634fff8ff 32 int _size;
ll16o2l 2:888634fff8ff 33 int _x;
ll16o2l 2:888634fff8ff 34 int _y;
ll16o2l 2:888634fff8ff 35 int _x_edge;
ll16o2l 2:888634fff8ff 36 int _y_edge;
ll16o2l 2:888634fff8ff 37 };
ll16o2l 2:888634fff8ff 38 #endif