![](/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.cpp@3:54132cf073d7, 2020-05-21 (annotated)
- Committer:
- MatisRequis
- Date:
- Thu May 21 07:10:22 2020 +0000
- Revision:
- 3:54132cf073d7
- Parent:
- 2:d59a92e65bd9
- Child:
- 4:8e3ba8d6d915
Fixed board drawpath
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
MatisRequis | 2:d59a92e65bd9 | 1 | #include "Bullet.h" |
MatisRequis | 2:d59a92e65bd9 | 2 | |
MatisRequis | 2:d59a92e65bd9 | 3 | Bullet::Bullet() { |
MatisRequis | 2:d59a92e65bd9 | 4 | |
MatisRequis | 2:d59a92e65bd9 | 5 | } |
MatisRequis | 2:d59a92e65bd9 | 6 | |
MatisRequis | 2:d59a92e65bd9 | 7 | Bullet::~Bullet() { |
MatisRequis | 2:d59a92e65bd9 | 8 | |
MatisRequis | 2:d59a92e65bd9 | 9 | } |
MatisRequis | 2:d59a92e65bd9 | 10 | |
MatisRequis | 3:54132cf073d7 | 11 | void Bullet::fire(int column) { |
MatisRequis | 3:54132cf073d7 | 12 | _currentpos = 0; |
MatisRequis | 3:54132cf073d7 | 13 | _column = column; |
MatisRequis | 3:54132cf073d7 | 14 | _board.path(); |
MatisRequis | 3:54132cf073d7 | 15 | _x = _board.drawcolumn[_column][_currentpos].x; |
MatisRequis | 3:54132cf073d7 | 16 | _y = _board.drawcolumn[_column][_currentpos].y; |
MatisRequis | 2:d59a92e65bd9 | 17 | } |
MatisRequis | 2:d59a92e65bd9 | 18 | |
MatisRequis | 2:d59a92e65bd9 | 19 | void Bullet::draw(N5110 &lcd) { |
MatisRequis | 3:54132cf073d7 | 20 | lcd.drawRect(_x, _y, 2, 2, FILL_BLACK); |
MatisRequis | 3:54132cf073d7 | 21 | } |
MatisRequis | 3:54132cf073d7 | 22 | |
MatisRequis | 3:54132cf073d7 | 23 | void Bullet::update( |