![](/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.
TempestEngine/TempestEngine.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:
- 7:94bc3e21d664
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 TEMPESTENGINE_H |
MatisRequis | 2:d59a92e65bd9 | 2 | #define TEMPESTENGINE_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 | 6:037dfa5064a1 | 7 | #include "Bullet.h" |
MatisRequis | 4:8e3ba8d6d915 | 8 | #include "Hero.h" |
MatisRequis | 3:54132cf073d7 | 9 | #include "Board.h" |
MatisRequis | 2:d59a92e65bd9 | 10 | |
MatisRequis | 6:037dfa5064a1 | 11 | #include <vector> |
MatisRequis | 6:037dfa5064a1 | 12 | |
MatisRequis | 2:d59a92e65bd9 | 13 | class TempestEngine { |
MatisRequis | 2:d59a92e65bd9 | 14 | |
MatisRequis | 2:d59a92e65bd9 | 15 | public: |
MatisRequis | 2:d59a92e65bd9 | 16 | |
MatisRequis | 2:d59a92e65bd9 | 17 | TempestEngine(); |
MatisRequis | 2:d59a92e65bd9 | 18 | ~TempestEngine(); |
MatisRequis | 2:d59a92e65bd9 | 19 | |
MatisRequis | 4:8e3ba8d6d915 | 20 | void init(); |
MatisRequis | 4:8e3ba8d6d915 | 21 | void read_input(Gamepad &pad); |
MatisRequis | 2:d59a92e65bd9 | 22 | void draw(N5110 &lcd); |
MatisRequis | 4:8e3ba8d6d915 | 23 | void update(); |
MatisRequis | 6:037dfa5064a1 | 24 | void create_bullets(); |
MatisRequis | 6:037dfa5064a1 | 25 | void draw_bullets(N5110 &lcd); |
MatisRequis | 2:d59a92e65bd9 | 26 | |
MatisRequis | 2:d59a92e65bd9 | 27 | private: |
MatisRequis | 6:037dfa5064a1 | 28 | //////////////////OBJECTS//////////////////// |
MatisRequis | 6:037dfa5064a1 | 29 | Board _board; |
MatisRequis | 6:037dfa5064a1 | 30 | Hero _hero; |
MatisRequis | 6:037dfa5064a1 | 31 | Gamepad _pad; |
MatisRequis | 2:d59a92e65bd9 | 32 | |
MatisRequis | 6:037dfa5064a1 | 33 | /////////////////VARIABLES//////////////// |
MatisRequis | 2:d59a92e65bd9 | 34 | int _column_amount; |
MatisRequis | 2:d59a92e65bd9 | 35 | int _bullet_speed; |
MatisRequis | 4:8e3ba8d6d915 | 36 | float _d; |
MatisRequis | 4:8e3ba8d6d915 | 37 | int _mag; |
MatisRequis | 2:d59a92e65bd9 | 38 | int _a; |
MatisRequis | 6:037dfa5064a1 | 39 | int _bullet_timer; |
MatisRequis | 6:037dfa5064a1 | 40 | |
MatisRequis | 6:037dfa5064a1 | 41 | /////////////////VECTOR///////////////// |
MatisRequis | 6:037dfa5064a1 | 42 | std::vector<Bullet> bullet_vect; |
MatisRequis | 2:d59a92e65bd9 | 43 | }; |
MatisRequis | 2:d59a92e65bd9 | 44 | |
MatisRequis | 2:d59a92e65bd9 | 45 | #endif |