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@24:67dc71a8f009, 2019-05-08 (annotated)
- Committer:
- el17m2h
- Date:
- Wed May 08 14:24:53 2019 +0000
- Revision:
- 24:67dc71a8f009
- Parent:
- 21:6b16ca9834e6
- Child:
- 26:d16a5b1e0ace
Added comments to the doodler h file.
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 | 20:a359092079b0 | 7 | #include "Enemy.h" |
el17m2h | 8:90e789413e0b | 8 | |
el17m2h | 24:67dc71a8f009 | 9 | /** Floors class |
el17m2h | 24:67dc71a8f009 | 10 | @brief Class for the floors |
el17m2h | 24:67dc71a8f009 | 11 | @author Melissa Hartmann |
el17m2h | 24:67dc71a8f009 | 12 | @date May 2019 |
el17m2h | 24:67dc71a8f009 | 13 | */ |
el17m2h | 1:0001cb3eb053 | 14 | class Floors{ |
el17m2h | 1:0001cb3eb053 | 15 | public: |
el17m2h | 1:0001cb3eb053 | 16 | Floors(); |
el17m2h | 1:0001cb3eb053 | 17 | ~Floors(); |
el17m2h | 24:67dc71a8f009 | 18 | |
el17m2h | 24:67dc71a8f009 | 19 | /** |
el17m2h | 24:67dc71a8f009 | 20 | @brief defines the initial position of the bullet |
el17m2h | 24:67dc71a8f009 | 21 | @param float dood_pos_x |
el17m2h | 24:67dc71a8f009 | 22 | @param float dood_pos_y |
el17m2h | 24:67dc71a8f009 | 23 | @details The intial position is in same position as doodler's trunk end (which is why I am adding the 12 and 4 to the doodler's position) |
el17m2h | 24:67dc71a8f009 | 24 | */ |
el17m2h | 11:2041290b5a74 | 25 | void init(int y, int width, int height); |
el17m2h | 24:67dc71a8f009 | 26 | |
el17m2h | 24:67dc71a8f009 | 27 | /** |
el17m2h | 24:67dc71a8f009 | 28 | @brief defines the initial position of the bullet |
el17m2h | 24:67dc71a8f009 | 29 | @param float dood_pos_x |
el17m2h | 24:67dc71a8f009 | 30 | @param float dood_pos_y |
el17m2h | 24:67dc71a8f009 | 31 | @details The intial position is in same position as doodler's trunk end (which is why I am adding the 12 and 4 to the doodler's position) |
el17m2h | 24:67dc71a8f009 | 32 | */ |
el17m2h | 1:0001cb3eb053 | 33 | void draw(N5110 &lcd); |
el17m2h | 24:67dc71a8f009 | 34 | |
el17m2h | 24:67dc71a8f009 | 35 | /** |
el17m2h | 24:67dc71a8f009 | 36 | @brief defines the initial position of the bullet |
el17m2h | 24:67dc71a8f009 | 37 | @param float dood_pos_x |
el17m2h | 24:67dc71a8f009 | 38 | @param float dood_pos_y |
el17m2h | 24:67dc71a8f009 | 39 | @details The intial position is in same position as doodler's trunk end (which is why I am adding the 12 and 4 to the doodler's position) |
el17m2h | 24:67dc71a8f009 | 40 | */ |
el17m2h | 15:4efa04a6a376 | 41 | void update(float doodler_pos_y); |
el17m2h | 24:67dc71a8f009 | 42 | |
el17m2h | 24:67dc71a8f009 | 43 | /** |
el17m2h | 24:67dc71a8f009 | 44 | @brief defines the initial position of the bullet |
el17m2h | 24:67dc71a8f009 | 45 | @param float dood_pos_x |
el17m2h | 24:67dc71a8f009 | 46 | @param float dood_pos_y |
el17m2h | 24:67dc71a8f009 | 47 | @details The intial position is in same position as doodler's trunk end (which is why I am adding the 12 and 4 to the doodler's position) |
el17m2h | 24:67dc71a8f009 | 48 | */ |
el17m2h | 14:529f798adae4 | 49 | Vector2D get_position(); |
el17m2h | 24:67dc71a8f009 | 50 | |
el17m2h | 24:67dc71a8f009 | 51 | /** |
el17m2h | 24:67dc71a8f009 | 52 | @brief defines the initial position of the bullet |
el17m2h | 24:67dc71a8f009 | 53 | @param float dood_pos_x |
el17m2h | 24:67dc71a8f009 | 54 | @param float dood_pos_y |
el17m2h | 24:67dc71a8f009 | 55 | @details The intial position is in same position as doodler's trunk end (which is why I am adding the 12 and 4 to the doodler's position) |
el17m2h | 24:67dc71a8f009 | 56 | */ |
el17m2h | 14:529f798adae4 | 57 | void set_position(Vector2D pos); // mutators |
el17m2h | 1:0001cb3eb053 | 58 | |
el17m2h | 1:0001cb3eb053 | 59 | private: |
el17m2h | 1:0001cb3eb053 | 60 | int _height; |
el17m2h | 1:0001cb3eb053 | 61 | int _width; |
el17m2h | 14:529f798adae4 | 62 | Vector2D _position; |
el17m2h | 20:a359092079b0 | 63 | Enemy _eny; |
el17m2h | 20:a359092079b0 | 64 | int place; |
el17m2h | 1:0001cb3eb053 | 65 | |
el17m2h | 1:0001cb3eb053 | 66 | }; |
el17m2h | 1:0001cb3eb053 | 67 | #endif |