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@27:4039cf79b3ec, 2019-04-19 (annotated)
- Committer:
- fy14lkaa
- Date:
- Fri Apr 19 19:40:48 2019 +0000
- Revision:
- 27:4039cf79b3ec
- Parent:
- 26:2801e3268228
- Child:
- 28:4786e81ce3e3
declared a mutator function [void set_pos (Vector2D p);] to set the position of the bullet.
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 | 21:5b953e368fba | 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 | 27:4039cf79b3ec | 22 | void set_velocity(Vector2D v); |
| fy14lkaa | 27:4039cf79b3ec | 23 | void set_pos(Vector2D p); |