![](/media/cache/group/default_image.jpg.50x50_q85.jpg)
Matis Requis 201241242
Dependencies: mbed
Tempest Game
Game Screen
The board is made of 12 columns. The Hero stays at the top of the column
Game Controls
To control the hero spaceship point the joystick to the column you want the hero to go to.
Press the A button to shoot a bullet in the column you are currently in.
Bullet/Bullet.h@6:037dfa5064a1, 2020-05-25 (annotated)
- Committer:
- MatisRequis
- Date:
- Mon May 25 07:46:48 2020 +0000
- Revision:
- 6:037dfa5064a1
- Parent:
- 4:8e3ba8d6d915
- Child:
- 10:2ae9d4145410
Added new bullet create and draw funtions
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
MatisRequis | 2:d59a92e65bd9 | 1 | #ifndef BULLET_H |
MatisRequis | 2:d59a92e65bd9 | 2 | #define BULLET_H |
MatisRequis | 2:d59a92e65bd9 | 3 | |
MatisRequis | 2:d59a92e65bd9 | 4 | #include "mbed.h" |
MatisRequis | 2:d59a92e65bd9 | 5 | #include "N5110.h" |
MatisRequis | 2:d59a92e65bd9 | 6 | #include "Gamepad.h" |
MatisRequis | 3:54132cf073d7 | 7 | #include "Board.h" |
MatisRequis | 2:d59a92e65bd9 | 8 | |
MatisRequis | 2:d59a92e65bd9 | 9 | class Bullet { |
MatisRequis | 2:d59a92e65bd9 | 10 | public: |
MatisRequis | 2:d59a92e65bd9 | 11 | Bullet(); |
MatisRequis | 2:d59a92e65bd9 | 12 | ~Bullet(); |
MatisRequis | 4:8e3ba8d6d915 | 13 | void init(int column); |
MatisRequis | 2:d59a92e65bd9 | 14 | void draw(N5110 &lcd); |
MatisRequis | 4:8e3ba8d6d915 | 15 | void update(); |
MatisRequis | 6:037dfa5064a1 | 16 | int checkdelete(); |
MatisRequis | 2:d59a92e65bd9 | 17 | private: |
MatisRequis | 2:d59a92e65bd9 | 18 | int _size; |
MatisRequis | 3:54132cf073d7 | 19 | int _column; |
MatisRequis | 2:d59a92e65bd9 | 20 | int _x; |
MatisRequis | 2:d59a92e65bd9 | 21 | int _y; |
MatisRequis | 3:54132cf073d7 | 22 | Board _board; |
MatisRequis | 3:54132cf073d7 | 23 | int _currentpos; |
MatisRequis | 2:d59a92e65bd9 | 24 | }; |
MatisRequis | 2:d59a92e65bd9 | 25 | #endif |