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
Fork of ll14zs by
Level/Level.h@3:1231a3961984, 2018-05-24 (annotated)
- Committer:
- ll14zs
- Date:
- Thu May 24 17:37:17 2018 +0000
- Revision:
- 3:1231a3961984
Final Submission. I have read and agreed with Statement of Academic Integrity
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
ll14zs | 3:1231a3961984 | 1 | #include "mbed.h" |
ll14zs | 3:1231a3961984 | 2 | #include "N5110.h" |
ll14zs | 3:1231a3961984 | 3 | #include "Gamepad.h" |
ll14zs | 3:1231a3961984 | 4 | #include "Car.h" |
ll14zs | 3:1231a3961984 | 5 | |
ll14zs | 3:1231a3961984 | 6 | class Level |
ll14zs | 3:1231a3961984 | 7 | { |
ll14zs | 3:1231a3961984 | 8 | |
ll14zs | 3:1231a3961984 | 9 | public: |
ll14zs | 3:1231a3961984 | 10 | |
ll14zs | 3:1231a3961984 | 11 | Level(); |
ll14zs | 3:1231a3961984 | 12 | ~Level(); |
ll14zs | 3:1231a3961984 | 13 | |
ll14zs | 3:1231a3961984 | 14 | void draw(N5110 &lcd); |
ll14zs | 3:1231a3961984 | 15 | |
ll14zs | 3:1231a3961984 | 16 | void update(); |
ll14zs | 3:1231a3961984 | 17 | |
ll14zs | 3:1231a3961984 | 18 | Vector2D get_velocity(); |
ll14zs | 3:1231a3961984 | 19 | |
ll14zs | 3:1231a3961984 | 20 | void set_velocity(Vector2D v); |
ll14zs | 3:1231a3961984 | 21 | |
ll14zs | 3:1231a3961984 | 22 | Vector2D get_pos(); |
ll14zs | 3:1231a3961984 | 23 | |
ll14zs | 3:1231a3961984 | 24 | void set_pos(Vector2D p); |
ll14zs | 3:1231a3961984 | 25 | |
ll14zs | 3:1231a3961984 | 26 | private: |
ll14zs | 3:1231a3961984 | 27 | |
ll14zs | 3:1231a3961984 | 28 | //parameters |
ll14zs | 3:1231a3961984 | 29 | int _width; |
ll14zs | 3:1231a3961984 | 30 | int _height; |
ll14zs | 3:1231a3961984 | 31 | int _x; |
ll14zs | 3:1231a3961984 | 32 | int _y; |
ll14zs | 3:1231a3961984 | 33 | Vector2D _velocity; |
ll14zs | 3:1231a3961984 | 34 | |
ll14zs | 3:1231a3961984 | 35 | }; |