Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed
Floors/Floors.h@1:0001cb3eb053, 2019-04-09 (annotated)
- Committer:
- el17m2h
- Date:
- Tue Apr 09 20:15:33 2019 +0000
- Revision:
- 1:0001cb3eb053
- Child:
- 2:360a6c301a4e
Main introductory page that draws the floors once the start button is pressed. I will then add a function to add multiple random floors and the doodler controlled by the user.
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
el17m2h | 1:0001cb3eb053 | 1 | #ifndef FLOORS_H |
el17m2h | 1:0001cb3eb053 | 2 | #define FLOORS_H |
el17m2h | 1:0001cb3eb053 | 3 | |
el17m2h | 1:0001cb3eb053 | 4 | #include "mbed.h" |
el17m2h | 1:0001cb3eb053 | 5 | #include "N5110.h" |
el17m2h | 1:0001cb3eb053 | 6 | #include "Gamepad.h" |
el17m2h | 1:0001cb3eb053 | 7 | class Floors{ |
el17m2h | 1:0001cb3eb053 | 8 | public: |
el17m2h | 1:0001cb3eb053 | 9 | Floors(); |
el17m2h | 1:0001cb3eb053 | 10 | ~Floors(); |
el17m2h | 1:0001cb3eb053 | 11 | void init(int height, int width); |
el17m2h | 1:0001cb3eb053 | 12 | void draw(N5110 &lcd); |
el17m2h | 1:0001cb3eb053 | 13 | Vector2D get_velocity(); //accesors |
el17m2h | 1:0001cb3eb053 | 14 | Vector2D get_pos(); |
el17m2h | 1:0001cb3eb053 | 15 | void set_pos(Vector2D p); // mutators |
el17m2h | 1:0001cb3eb053 | 16 | void set_velocity (Vector2D v); |
el17m2h | 1:0001cb3eb053 | 17 | |
el17m2h | 1:0001cb3eb053 | 18 | private: |
el17m2h | 1:0001cb3eb053 | 19 | int _height; |
el17m2h | 1:0001cb3eb053 | 20 | int _width; |
el17m2h | 1:0001cb3eb053 | 21 | int _x; |
el17m2h | 1:0001cb3eb053 | 22 | int _y; |
el17m2h | 1:0001cb3eb053 | 23 | Vector2D _velocity; |
el17m2h | 1:0001cb3eb053 | 24 | |
el17m2h | 1:0001cb3eb053 | 25 | }; |
el17m2h | 1:0001cb3eb053 | 26 | #endif |