Harry Rance 200925395 Embedded Systems Project

Dependencies:   mbed

Committer:
harryrance
Date:
Thu Apr 13 13:30:39 2017 +0000
Revision:
1:95d7dd44bb0d
Parent:
0:c9bf674fe0c7
Child:
3:43970d8d642e
Does all as before, added in bullet firing function, but only one bullet can be fired at this time. WORK ON: generating multiple instances of the bullet in one game.;

Who changed what in which revision?

UserRevisionLine numberNew contents of line
harryrance 0:c9bf674fe0c7 1 #ifndef USERSHIP_H
harryrance 0:c9bf674fe0c7 2 #define USERSHIP_H
harryrance 0:c9bf674fe0c7 3
harryrance 0:c9bf674fe0c7 4 #include "mbed.h"
harryrance 0:c9bf674fe0c7 5 #include "N5110.h"
harryrance 0:c9bf674fe0c7 6 #include "Gamepad.h"
harryrance 0:c9bf674fe0c7 7
harryrance 0:c9bf674fe0c7 8 class UserShip
harryrance 0:c9bf674fe0c7 9 {
harryrance 0:c9bf674fe0c7 10 public:
harryrance 0:c9bf674fe0c7 11 UserShip();
harryrance 0:c9bf674fe0c7 12 ~UserShip();
harryrance 0:c9bf674fe0c7 13 void initialise(int y, int x_origin, int y_origin);
harryrance 0:c9bf674fe0c7 14 void draw(N5110 &lcd);
harryrance 0:c9bf674fe0c7 15 void update(Direction d, float mag);
harryrance 0:c9bf674fe0c7 16 Vector2D get_pos();
harryrance 1:95d7dd44bb0d 17 void set_pos(Vector2D p);
harryrance 0:c9bf674fe0c7 18
harryrance 0:c9bf674fe0c7 19 private:
harryrance 0:c9bf674fe0c7 20 int _x_origin;
harryrance 0:c9bf674fe0c7 21 int _y_origin;
harryrance 0:c9bf674fe0c7 22 int _x;
harryrance 0:c9bf674fe0c7 23 int _y;
harryrance 0:c9bf674fe0c7 24 int _speed;
harryrance 0:c9bf674fe0c7 25
harryrance 0:c9bf674fe0c7 26 };
harryrance 0:c9bf674fe0c7 27 #endif
harryrance 0:c9bf674fe0c7 28