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
- Committer:
- MatisRequis
- Date:
- 2020-05-25
- Revision:
- 6:037dfa5064a1
- Parent:
- 4:8e3ba8d6d915
- Child:
- 9:759b419fec3b
File content as of revision 6:037dfa5064a1:
#include "Bullet.h" Bullet::Bullet() { } Bullet::~Bullet() { } void Bullet::init(int column) { _currentpos = 0; _column = column; _board.path(); } void Bullet::draw(N5110 &lcd) { _x = _board.drawcolumn[_column][_currentpos].x; _y = _board.drawcolumn[_column][_currentpos].y; lcd.drawRect(_x, _y, 2, 2, FILL_BLACK); } void Bullet::update() { _currentpos++; } int Bullet::checkdelete() { if (_currentpos > 14) { return 1; } else { return 0; } }