James Heavey / Mbed 2 deprecated EL17JH

Dependencies:   mbed

Committer:
jamesheavey
Date:
Mon May 06 23:31:30 2019 +0000
Revision:
93:18f81996ea89
Parent:
91:c01a736fb0d9
Child:
129:b47c28c7eaaf
cp

Who changed what in which revision?

UserRevisionLine numberNew contents of line
jamesheavey 28:d058f7f5885d 1 #ifndef LASER_H
jamesheavey 28:d058f7f5885d 2 #define LASER_H
jamesheavey 28:d058f7f5885d 3
jamesheavey 28:d058f7f5885d 4 #include "mbed.h"
jamesheavey 28:d058f7f5885d 5 #include "N5110.h"
jamesheavey 28:d058f7f5885d 6 #include "Gamepad.h"
jamesheavey 28:d058f7f5885d 7 #include "Paddle.h"
jamesheavey 28:d058f7f5885d 8
jamesheavey 86:01f33d94e496 9 /* Laser Class
jamesheavey 86:01f33d94e496 10 @author James Heavey, University of Leeds
jamesheavey 91:c01a736fb0d9 11 @brief Controls the Laser in the Breakout game
jamesheavey 86:01f33d94e496 12 @date May 2019
jamesheavey 91:c01a736fb0d9 13 */
jamesheavey 28:d058f7f5885d 14 class Laser
jamesheavey 28:d058f7f5885d 15 {
jamesheavey 28:d058f7f5885d 16
jamesheavey 28:d058f7f5885d 17 public:
jamesheavey 28:d058f7f5885d 18 Laser();
jamesheavey 28:d058f7f5885d 19 ~Laser();
jamesheavey 93:18f81996ea89 20 void init();
jamesheavey 28:d058f7f5885d 21 void draw(N5110 &lcd);
jamesheavey 28:d058f7f5885d 22 void update();
jamesheavey 28:d058f7f5885d 23 /// accessors and mutators
jamesheavey 36:cb73014d3a99 24 int get_x();
jamesheavey 36:cb73014d3a99 25 int get_y();
jamesheavey 36:cb73014d3a99 26 void set_posx(int x);
jamesheavey 36:cb73014d3a99 27 void set_posy(int y);
jamesheavey 91:c01a736fb0d9 28
jamesheavey 28:d058f7f5885d 29 private:
jamesheavey 28:d058f7f5885d 30
jamesheavey 93:18f81996ea89 31 int _speed_y;
jamesheavey 28:d058f7f5885d 32 int _x;
jamesheavey 28:d058f7f5885d 33 int _y;
jamesheavey 28:d058f7f5885d 34 };
jamesheavey 28:d058f7f5885d 35 #endif