ELEC2645 (2018/19) / Mbed 2 deprecated ll16o2l_ELEC2645

Dependencies:   mbed Gamepad

Committer:
ll16o2l
Date:
Thu Apr 25 18:49:50 2019 +0000
Revision:
8:c3153fd4d8ce
Parent:
4:b71e0eed67db
Child:
15:807eba7c7811
Neaten code and implemented heath pack to the game.

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 8:c3153fd4d8ce 9 /** Objects Class
ll16o2l 3:aa82968b7a8e 10 * @author Oliver Luong, University of Leeds
ll16o2l 3:aa82968b7a8e 11 * @brief Controls the objects in the Dodge game
ll16o2l 3:aa82968b7a8e 12 * @date 22/04/2019
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