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
rec/rect.h@5:0a116644cce2, 2018-04-16 (annotated)
- Committer:
- RickYu
- Date:
- Mon Apr 16 09:57:57 2018 +0000
- Revision:
- 5:0a116644cce2
- Parent:
- 3:1a134243e2f0
- Child:
- 10:ef01b3076040
the boom can drop wiz random x-postion
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
RickYu | 2:421fb0670c5c | 1 | #ifndef RECT_H |
RickYu | 2:421fb0670c5c | 2 | #define RECT_H |
RickYu | 2:421fb0670c5c | 3 | |
RickYu | 2:421fb0670c5c | 4 | #include "mbed.h" |
RickYu | 2:421fb0670c5c | 5 | #include "N5110.h" |
RickYu | 2:421fb0670c5c | 6 | #include "Gamepad.h" |
RickYu | 2:421fb0670c5c | 7 | class rect{ |
RickYu | 2:421fb0670c5c | 8 | |
RickYu | 2:421fb0670c5c | 9 | public: |
RickYu | 2:421fb0670c5c | 10 | rect(); |
RickYu | 2:421fb0670c5c | 11 | ~rect(); |
RickYu | 3:1a134243e2f0 | 12 | void init(int x,int y); |
RickYu | 2:421fb0670c5c | 13 | void draw(N5110 &lcd); |
RickYu | 2:421fb0670c5c | 14 | void update(Direction d,float mag); |
RickYu | 2:421fb0670c5c | 15 | Vector2D get_pos(); |
RickYu | 5:0a116644cce2 | 16 | void set_pos(Vector2D p); |
RickYu | 2:421fb0670c5c | 17 | |
RickYu | 2:421fb0670c5c | 18 | private: |
RickYu | 2:421fb0670c5c | 19 | int rect_x; |
RickYu | 2:421fb0670c5c | 20 | int rect_y; |
RickYu | 2:421fb0670c5c | 21 | int rect_speed; |
RickYu | 3:1a134243e2f0 | 22 | |
RickYu | 2:421fb0670c5c | 23 | }; |
RickYu | 2:421fb0670c5c | 24 | |
RickYu | 2:421fb0670c5c | 25 | |
RickYu | 2:421fb0670c5c | 26 | #endif |