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
bullet/bullet.h@30:9688950d9f38, 2019-04-20 (annotated)
- Committer:
- fy14lkaa
- Date:
- Sat Apr 20 00:53:42 2019 +0000
- Revision:
- 30:9688950d9f38
- Parent:
- 29:3cc490f4ffb9
- Child:
- 31:5c9309ddf84c
added all the private variables for bullet class.
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| fy14lkaa | 21:5b953e368fba | 1 | #include "mbed.h" |
| fy14lkaa | 21:5b953e368fba | 2 | #include "N5110.h" |
| fy14lkaa | 21:5b953e368fba | 3 | #include "Gamepad.h" |
| fy14lkaa | 28:4786e81ce3e3 | 4 | #include "Alien.h" |
| fy14lkaa | 21:5b953e368fba | 5 | |
| fy14lkaa | 22:6d3c3f2715d0 | 6 | /** bullet Class |
| fy14lkaa | 22:6d3c3f2715d0 | 7 | @author Laila Al Badwawi, University of Leeds |
| fy14lkaa | 22:6d3c3f2715d0 | 8 | @brief Controls the bullet in the SpaceInvaders game |
| fy14lkaa | 22:6d3c3f2715d0 | 9 | @date April 2019 |
| fy14lkaa | 22:6d3c3f2715d0 | 10 | */ |
| fy14lkaa | 22:6d3c3f2715d0 | 11 | |
| fy14lkaa | 22:6d3c3f2715d0 | 12 | class bullet |
| fy14lkaa | 22:6d3c3f2715d0 | 13 | { |
| fy14lkaa | 22:6d3c3f2715d0 | 14 | |
| fy14lkaa | 22:6d3c3f2715d0 | 15 | public: |
| fy14lkaa | 22:6d3c3f2715d0 | 16 | bullet(); |
| fy14lkaa | 23:bfda24746bd4 | 17 | ~bullet(); |
| fy14lkaa | 23:bfda24746bd4 | 18 | |
| fy14lkaa | 24:d4919c29a663 | 19 | void init(int size,int speed); |
| fy14lkaa | 25:70c70192eae5 | 20 | void draw(N5110 &lcd); |
| fy14lkaa | 26:2801e3268228 | 21 | void update(); |
| fy14lkaa | 29:3cc490f4ffb9 | 22 | void set_velocity(Vector2D v); |
| fy14lkaa | 29:3cc490f4ffb9 | 23 | void set_pos(Vector2D p); |
| fy14lkaa | 28:4786e81ce3e3 | 24 | Vector2D get_pos(); |
| fy14lkaa | 30:9688950d9f38 | 25 | Vector2D get_velocity(); |
| fy14lkaa | 30:9688950d9f38 | 26 | |
| fy14lkaa | 30:9688950d9f38 | 27 | private: |
| fy14lkaa | 30:9688950d9f38 | 28 | |
| fy14lkaa | 30:9688950d9f38 | 29 | Vector2D _velocity; |
| fy14lkaa | 30:9688950d9f38 | 30 | int _size; |
| fy14lkaa | 30:9688950d9f38 | 31 | int _x; |
| fy14lkaa | 30:9688950d9f38 | 32 | int _y; |
| fy14lkaa | 30:9688950d9f38 | 33 | }; |
| fy14lkaa | 30:9688950d9f38 | 34 | #endif |