![](/media/cache/group/default_image.jpg.50x50_q85.jpg)
Shell code for the Tanks game
Dependencies: 4DGL-uLCD-SE EthernetInterface Game_Synchronizer MMA8452 SDFileSystem mbed-rtos mbed wave_player
Bullet/bullet.h@17:7bc7127782e4, 2015-10-28 (annotated)
- Committer:
- jford38
- Date:
- Wed Oct 28 04:30:22 2015 +0000
- Revision:
- 17:7bc7127782e4
- Parent:
- bullet.h@15:4b27a3a95772
- Child:
- 21:edfeb289b21f
Works with updates to game synchronizer. The synchronizer now contains buttons/accelerometers.
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
jford38 | 15:4b27a3a95772 | 1 | #ifndef BULLET_H__ |
jford38 | 15:4b27a3a95772 | 2 | #define BULLET_H__ |
jford38 | 15:4b27a3a95772 | 3 | |
jford38 | 15:4b27a3a95772 | 4 | #include "tank.h" |
jford38 | 15:4b27a3a95772 | 5 | |
jford38 | 15:4b27a3a95772 | 6 | class Bullet{ |
jford38 | 15:4b27a3a95772 | 7 | public: |
jford38 | 15:4b27a3a95772 | 8 | int x0; |
jford38 | 15:4b27a3a95772 | 9 | int y0; |
jford38 | 15:4b27a3a95772 | 10 | float vx0; |
jford38 | 15:4b27a3a95772 | 11 | float vy0; |
jford38 | 15:4b27a3a95772 | 12 | int x; |
jford38 | 15:4b27a3a95772 | 13 | int y; |
jford38 | 15:4b27a3a95772 | 14 | int speed; |
jford38 | 15:4b27a3a95772 | 15 | float time; |
jford38 | 15:4b27a3a95772 | 16 | bool in_flight; |
jford38 | 15:4b27a3a95772 | 17 | |
jford38 | 15:4b27a3a95772 | 18 | Tank* tank; |
jford38 | 15:4b27a3a95772 | 19 | |
jford38 | 15:4b27a3a95772 | 20 | Bullet(Tank* t); |
jford38 | 15:4b27a3a95772 | 21 | void shoot(void); |
jford38 | 15:4b27a3a95772 | 22 | int time_step(float dt); |
jford38 | 15:4b27a3a95772 | 23 | }; |
jford38 | 15:4b27a3a95772 | 24 | |
jford38 | 15:4b27a3a95772 | 25 | #endif |