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
Enemy/Enemy.h@9:62fe47a1374f, 2020-05-23 (annotated)
- Committer:
- Albutt
- Date:
- Sat May 23 13:26:19 2020 +0000
- Revision:
- 9:62fe47a1374f
- Parent:
- 8:0c6d6ed55851
- Child:
- 10:71ced616a64f
Multiple Enemies Spawning, Bullets Despawn when hit
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| Albutt | 5:51fd6635141f | 1 | #include "mbed.h" |
| Albutt | 5:51fd6635141f | 2 | #include "N5110.h" |
| Albutt | 5:51fd6635141f | 3 | #include "Gamepad.h" |
| Albutt | 5:51fd6635141f | 4 | |
| Albutt | 5:51fd6635141f | 5 | |
| Albutt | 5:51fd6635141f | 6 | class Enemy |
| Albutt | 5:51fd6635141f | 7 | { |
| Albutt | 5:51fd6635141f | 8 | public: |
| Albutt | 6:546eba371942 | 9 | Enemy(int seed); |
| Albutt | 5:51fd6635141f | 10 | ~Enemy(); |
| Albutt | 5:51fd6635141f | 11 | void init(); |
| Albutt | 5:51fd6635141f | 12 | void draw(N5110 &lcd); |
| Albutt | 5:51fd6635141f | 13 | void update(int player_x, int player_y); |
| Albutt | 5:51fd6635141f | 14 | int get_x(); |
| Albutt | 5:51fd6635141f | 15 | int get_y(); |
| Albutt | 8:0c6d6ed55851 | 16 | void reset(int seed); |
| Albutt | 8:0c6d6ed55851 | 17 | void dead(); |
| Albutt | 5:51fd6635141f | 18 | private: |
| Albutt | 9:62fe47a1374f | 19 | bool _dead; |
| Albutt | 5:51fd6635141f | 20 | int _x; |
| Albutt | 5:51fd6635141f | 21 | int _y; |
| Albutt | 5:51fd6635141f | 22 | int _speed; |
| Albutt | 8:0c6d6ed55851 | 23 | int four; |
| Albutt | 5:51fd6635141f | 24 | }; |