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 MotionSensor
Entity/Walls/Walls.h@58:c8d90bb7404a, 2019-05-09 (annotated)
- Committer:
- el17sm
- Date:
- Thu May 09 14:43:45 2019 +0000
- Revision:
- 58:c8d90bb7404a
- Parent:
- 41:0697508a28ba
- Child:
- 59:fd4669864b67
Fully Doxygenated
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| el17sm | 41:0697508a28ba | 1 | #ifndef WALLS_H |
| el17sm | 41:0697508a28ba | 2 | #define WALLS_H |
| el17sm | 41:0697508a28ba | 3 | #include "Entity.h" |
| el17sm | 58:c8d90bb7404a | 4 | /**Walls Class |
| el17sm | 58:c8d90bb7404a | 5 | @author Steven Mahasin |
| el17sm | 58:c8d90bb7404a | 6 | @brief Creates a Static Wall which inherits the Entity class, not used yet in this version due to bugged spawn areas |
| el17sm | 58:c8d90bb7404a | 7 | @date May 2019 |
| el17sm | 58:c8d90bb7404a | 8 | */ |
| el17sm | 41:0697508a28ba | 9 | class Walls : public Entity |
| el17sm | 41:0697508a28ba | 10 | { |
| el17sm | 41:0697508a28ba | 11 | public: |
| el17sm | 58:c8d90bb7404a | 12 | /** Constructor |
| el17sm | 58:c8d90bb7404a | 13 | * @brief creates a wall at positions pos_x and pos_y |
| el17sm | 58:c8d90bb7404a | 14 | * @param pos_x @details initialise _position.x |
| el17sm | 58:c8d90bb7404a | 15 | * @param pos_y @details initialise _position.y |
| el17sm | 58:c8d90bb7404a | 16 | * @param hitbox_width @details initialise _hitbox.width |
| el17sm | 58:c8d90bb7404a | 17 | * @param hitbox_height @details initialise _hitbox.height |
| el17sm | 58:c8d90bb7404a | 18 | */ |
| el17sm | 41:0697508a28ba | 19 | Walls(int pos_x, int pos_y, int hitbox_width, int hitbox_height); |
| el17sm | 41:0697508a28ba | 20 | |
| el17sm | 41:0697508a28ba | 21 | // Functions |
| el17sm | 58:c8d90bb7404a | 22 | /** |
| el17sm | 58:c8d90bb7404a | 23 | * @brief just because entity has a pure virtual function move, the function is of no use in walls as it does not move |
| el17sm | 58:c8d90bb7404a | 24 | * @param unused @details not used |
| el17sm | 58:c8d90bb7404a | 25 | * @param unused1 @details not used |
| el17sm | 58:c8d90bb7404a | 26 | * @param unused2 @details not used |
| el17sm | 58:c8d90bb7404a | 27 | * @param unused3 @details not used |
| el17sm | 58:c8d90bb7404a | 28 | */ |
| el17sm | 41:0697508a28ba | 29 | virtual void move(float unused, float unused1, char * unused2, bool * unused3); // movement control and miscellaneous updates |
| el17sm | 58:c8d90bb7404a | 30 | /** |
| el17sm | 58:c8d90bb7404a | 31 | * @brief just because entity has a pure virtual function take_damage, the function is of no use in walls as it does take_damage |
| el17sm | 58:c8d90bb7404a | 32 | * @param unused @details not used |
| el17sm | 58:c8d90bb7404a | 33 | */ |
| el17sm | 58:c8d90bb7404a | 34 | virtual void take_damage(int unused); |
| el17sm | 58:c8d90bb7404a | 35 | /** |
| el17sm | 58:c8d90bb7404a | 36 | * @brief a virtual function of drawing the walls onto the screen |
| el17sm | 58:c8d90bb7404a | 37 | * @param lcd @details the screen where the wall is drawn on |
| el17sm | 58:c8d90bb7404a | 38 | */ |
| el17sm | 41:0697508a28ba | 39 | virtual void draw(N5110 &lcd); |
| el17sm | 41:0697508a28ba | 40 | }; |
| el17sm | 41:0697508a28ba | 41 | |
| el17sm | 41:0697508a28ba | 42 | #endif |