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/Player/Bullets/Bullets.h@34:1d5b4da3935e, 2019-05-06 (annotated)
- Committer:
- el17sm
- Date:
- Mon May 06 13:58:39 2019 +0000
- Revision:
- 34:1d5b4da3935e
- Parent:
- 33:4f3948dcd2f7
- Child:
- 38:09832e662803
- Child:
- 53:93338b52489d
Char conversion complete;
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| el17sm | 32:fe6359ef9916 | 1 | #ifndef BULLETS_H |
| el17sm | 32:fe6359ef9916 | 2 | #define BULLETS_H |
| el17sm | 32:fe6359ef9916 | 3 | #include "Entity.h" |
| el17sm | 32:fe6359ef9916 | 4 | |
| el17sm | 32:fe6359ef9916 | 5 | class Bullets : public Entity |
| el17sm | 32:fe6359ef9916 | 6 | { |
| el17sm | 32:fe6359ef9916 | 7 | |
| el17sm | 32:fe6359ef9916 | 8 | public: |
| el17sm | 32:fe6359ef9916 | 9 | // Constructor |
| el17sm | 32:fe6359ef9916 | 10 | Bullets(float, float, int); |
| el17sm | 32:fe6359ef9916 | 11 | |
| el17sm | 32:fe6359ef9916 | 12 | // Functions |
| el17sm | 34:1d5b4da3935e | 13 | virtual void move(float, float, char * map, bool * doorways); |
| el17sm | 32:fe6359ef9916 | 14 | virtual void draw(N5110 &lcd); |
| el17sm | 32:fe6359ef9916 | 15 | virtual void take_damage(int damage); |
| el17sm | 34:1d5b4da3935e | 16 | bool out_of_bounds_check(char * map, bool * doorways); |
| el17sm | 32:fe6359ef9916 | 17 | |
| el17sm | 32:fe6359ef9916 | 18 | private: |
| el17sm | 32:fe6359ef9916 | 19 | // Private Functions |
| el17sm | 33:4f3948dcd2f7 | 20 | char * get_frame(); |
| el17sm | 32:fe6359ef9916 | 21 | // Member Variable |
| el17sm | 32:fe6359ef9916 | 22 | int direction; |
| el17sm | 32:fe6359ef9916 | 23 | }; |
| el17sm | 32:fe6359ef9916 | 24 | |
| el17sm | 33:4f3948dcd2f7 | 25 | const char bullets_sprite[3][3] = {{1,1,1}, |
| el17sm | 32:fe6359ef9916 | 26 | {1,1,1}, |
| el17sm | 32:fe6359ef9916 | 27 | {1,1,1} |
| el17sm | 32:fe6359ef9916 | 28 | }; |
| el17sm | 32:fe6359ef9916 | 29 | |
| el17sm | 32:fe6359ef9916 | 30 | #endif |