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
Projectile/Projectile.h@16:a2c945279b79, 2019-04-24 (annotated)
- Committer:
- el17mcd
- Date:
- Wed Apr 24 13:44:12 2019 +0000
- Revision:
- 16:a2c945279b79
- Parent:
- 12:9e6d5d0a0c82
- Child:
- 17:cb39d9fa08dc
! Player now receives score at the end of the game. leaderboard added in the menus.
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| el17mcd | 7:a3ccabdebe2e | 1 | #ifndef PROJECTILE_H |
| el17mcd | 7:a3ccabdebe2e | 2 | #define PROJECTILE_H |
| el17mcd | 7:a3ccabdebe2e | 3 | |
| el17mcd | 7:a3ccabdebe2e | 4 | #include "mbed.h" |
| el17mcd | 7:a3ccabdebe2e | 5 | #include "N5110.h" |
| el17mcd | 7:a3ccabdebe2e | 6 | #include "Gamepad.h" |
| el17mcd | 7:a3ccabdebe2e | 7 | |
| el17mcd | 7:a3ccabdebe2e | 8 | |
| el17mcd | 7:a3ccabdebe2e | 9 | class Projectile |
| el17mcd | 7:a3ccabdebe2e | 10 | { |
| el17mcd | 16:a2c945279b79 | 11 | |
| el17mcd | 7:a3ccabdebe2e | 12 | public: |
| el17mcd | 7:a3ccabdebe2e | 13 | |
| el17mcd | 16:a2c945279b79 | 14 | Projectile(); |
| el17mcd | 16:a2c945279b79 | 15 | ~Projectile(); |
| el17mcd | 16:a2c945279b79 | 16 | |
| el17mcd | 16:a2c945279b79 | 17 | // Accessors |
| el17mcd | 16:a2c945279b79 | 18 | int get_position_x(); |
| el17mcd | 16:a2c945279b79 | 19 | int get_position_y(); |
| el17mcd | 16:a2c945279b79 | 20 | int get_hitbox(int i); |
| el17mcd | 16:a2c945279b79 | 21 | // Mutators |
| el17mcd | 16:a2c945279b79 | 22 | void set_launch_parameters(int x, int y, float ang, float vel, float grav, float wind); |
| el17mcd | 16:a2c945279b79 | 23 | // Other Methods |
| el17mcd | 8:d4e419dad90f | 24 | void generate_hitbox(); |
| el17mcd | 9:fe912235dd71 | 25 | void update_flight(); |
| el17mcd | 9:fe912235dd71 | 26 | bool check_boundaries(); |
| el17mcd | 7:a3ccabdebe2e | 27 | |
| el17mcd | 7:a3ccabdebe2e | 28 | private: |
| el17mcd | 7:a3ccabdebe2e | 29 | |
| el17mcd | 7:a3ccabdebe2e | 30 | int _position_x; |
| el17mcd | 7:a3ccabdebe2e | 31 | int _position_y; |
| el17mcd | 7:a3ccabdebe2e | 32 | int _hitbox[5]; |
| el17mcd | 8:d4e419dad90f | 33 | int _init_x; |
| el17mcd | 8:d4e419dad90f | 34 | int _init_y; |
| el17mcd | 11:4e2eb64031a0 | 35 | float _time; |
| el17mcd | 8:d4e419dad90f | 36 | float _lnch_ang; |
| el17mcd | 16:a2c945279b79 | 37 | float _init_vel; |
| el17mcd | 16:a2c945279b79 | 38 | float _grav_acc; |
| el17mcd | 8:d4e419dad90f | 39 | float _wind_acc; |
| el17mcd | 7:a3ccabdebe2e | 40 | |
| el17mcd | 7:a3ccabdebe2e | 41 | }; |
| el17mcd | 7:a3ccabdebe2e | 42 | |
| el17mcd | 7:a3ccabdebe2e | 43 | #endif // PROJECTILE_H |