Nemesis game, stats
Bullet.h@6:fb678d095e0a, 2017-04-02 (annotated)
- Committer:
- musallambseiso
- Date:
- Sun Apr 02 17:47:38 2017 +0000
- Revision:
- 6:fb678d095e0a
- Parent:
- Ship1.h@5:b822aaa6200d
Added framework for bullet, still minimal progress
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
musallambseiso | 6:fb678d095e0a | 1 | #ifndef BULLET_H |
musallambseiso | 6:fb678d095e0a | 2 | #define BULLET_H |
musallambseiso | 5:b822aaa6200d | 3 | |
musallambseiso | 5:b822aaa6200d | 4 | #include "mbed.h" |
musallambseiso | 5:b822aaa6200d | 5 | #include "N5110.h" |
musallambseiso | 5:b822aaa6200d | 6 | #include "Gamepad.h" |
musallambseiso | 5:b822aaa6200d | 7 | #include "Friendly.h" |
musallambseiso | 5:b822aaa6200d | 8 | |
musallambseiso | 6:fb678d095e0a | 9 | class Bullet |
musallambseiso | 5:b822aaa6200d | 10 | { |
musallambseiso | 5:b822aaa6200d | 11 | |
musallambseiso | 5:b822aaa6200d | 12 | public: |
musallambseiso | 6:fb678d095e0a | 13 | Bullet(); |
musallambseiso | 6:fb678d095e0a | 14 | ~Bullet(); |
musallambseiso | 6:fb678d095e0a | 15 | void init(N5110 &lcd, Gamepad &pad, int speed); |
musallambseiso | 5:b822aaa6200d | 16 | void draw(N5110 &lcd); |
musallambseiso | 5:b822aaa6200d | 17 | void update(); |
musallambseiso | 6:fb678d095e0a | 18 | |
musallambseiso | 5:b822aaa6200d | 19 | void set_velocity(Vector2D v); |
musallambseiso | 5:b822aaa6200d | 20 | Vector2D get_velocity(); |
musallambseiso | 5:b822aaa6200d | 21 | Vector2D get_pos(); |
musallambseiso | 5:b822aaa6200d | 22 | void set_pos(Vector2D p); |
musallambseiso | 5:b822aaa6200d | 23 | |
musallambseiso | 5:b822aaa6200d | 24 | private: |
musallambseiso | 6:fb678d095e0a | 25 | Friendly _friendly; |
musallambseiso | 5:b822aaa6200d | 26 | Vector2D _velocity; |
musallambseiso | 5:b822aaa6200d | 27 | int _x; |
musallambseiso | 5:b822aaa6200d | 28 | int _y; |
musallambseiso | 5:b822aaa6200d | 29 | }; |
musallambseiso | 6:fb678d095e0a | 30 | |
musallambseiso | 5:b822aaa6200d | 31 | #endif |