Nemesis game, stats
Ship1.h@5:b822aaa6200d, 2017-04-01 (annotated)
- Committer:
- musallambseiso
- Date:
- Sat Apr 01 11:43:25 2017 +0000
- Revision:
- 5:b822aaa6200d
Fixed collisions, works perfectly
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
musallambseiso | 5:b822aaa6200d | 1 | #ifndef SHIP1_H |
musallambseiso | 5:b822aaa6200d | 2 | #define SHIP1_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 | 5:b822aaa6200d | 9 | class Ship1 |
musallambseiso | 5:b822aaa6200d | 10 | { |
musallambseiso | 5:b822aaa6200d | 11 | |
musallambseiso | 5:b822aaa6200d | 12 | public: |
musallambseiso | 5:b822aaa6200d | 13 | Ship1(); |
musallambseiso | 5:b822aaa6200d | 14 | ~Ship1(); |
musallambseiso | 5:b822aaa6200d | 15 | void init(int size,int speed); |
musallambseiso | 5:b822aaa6200d | 16 | void draw(N5110 &lcd); |
musallambseiso | 5:b822aaa6200d | 17 | void update(); |
musallambseiso | 5:b822aaa6200d | 18 | /// accessors and mutators |
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 | 5:b822aaa6200d | 25 | |
musallambseiso | 5:b822aaa6200d | 26 | Vector2D _velocity; |
musallambseiso | 5:b822aaa6200d | 27 | int _size; |
musallambseiso | 5:b822aaa6200d | 28 | int _x; |
musallambseiso | 5:b822aaa6200d | 29 | int _y; |
musallambseiso | 5:b822aaa6200d | 30 | }; |
musallambseiso | 5:b822aaa6200d | 31 | #endif |