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@38:09832e662803, 2019-05-07 (annotated)
- Committer:
- el17sm
- Date:
- Tue May 07 09:09:38 2019 +0000
- Revision:
- 38:09832e662803
- Parent:
- 34:1d5b4da3935e
Attempted creation of mob Cowboy
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 | 38:09832e662803 | 4 | #define MAX_BULLETS 15 |
| el17sm | 32:fe6359ef9916 | 5 | |
| el17sm | 32:fe6359ef9916 | 6 | class Bullets : public Entity |
| el17sm | 32:fe6359ef9916 | 7 | { |
| el17sm | 32:fe6359ef9916 | 8 | |
| el17sm | 32:fe6359ef9916 | 9 | public: |
| el17sm | 32:fe6359ef9916 | 10 | // Constructor |
| el17sm | 32:fe6359ef9916 | 11 | Bullets(float, float, int); |
| el17sm | 32:fe6359ef9916 | 12 | |
| el17sm | 32:fe6359ef9916 | 13 | // Functions |
| el17sm | 34:1d5b4da3935e | 14 | virtual void move(float, float, char * map, bool * doorways); |
| el17sm | 32:fe6359ef9916 | 15 | virtual void draw(N5110 &lcd); |
| el17sm | 32:fe6359ef9916 | 16 | virtual void take_damage(int damage); |
| el17sm | 34:1d5b4da3935e | 17 | bool out_of_bounds_check(char * map, bool * doorways); |
| el17sm | 32:fe6359ef9916 | 18 | |
| el17sm | 32:fe6359ef9916 | 19 | private: |
| el17sm | 32:fe6359ef9916 | 20 | // Private Functions |
| el17sm | 33:4f3948dcd2f7 | 21 | char * get_frame(); |
| el17sm | 32:fe6359ef9916 | 22 | // Member Variable |
| el17sm | 32:fe6359ef9916 | 23 | int direction; |
| el17sm | 32:fe6359ef9916 | 24 | }; |
| el17sm | 32:fe6359ef9916 | 25 | |
| el17sm | 33:4f3948dcd2f7 | 26 | const char bullets_sprite[3][3] = {{1,1,1}, |
| el17sm | 32:fe6359ef9916 | 27 | {1,1,1}, |
| el17sm | 32:fe6359ef9916 | 28 | {1,1,1} |
| el17sm | 32:fe6359ef9916 | 29 | }; |
| el17sm | 32:fe6359ef9916 | 30 | |
| el17sm | 32:fe6359ef9916 | 31 | #endif |