![](/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
- Committer:
- MatisRequis
- Date:
- 2020-05-26
- Revision:
- 10:2ae9d4145410
- Parent:
- 6:037dfa5064a1
File content as of revision 10:2ae9d4145410:
#ifndef BULLET_H #define BULLET_H // Included Libraries #include "mbed.h" #include "N5110.h" #include "Gamepad.h" #include "Board.h" /** Bullet Class * @brief Draws and moves the bullets * @author Matis Requis * @date May, 2020 */ class Bullet { public: /** Constructor */ Bullet(); /** Destructor */ ~Bullet(); /** Initialises the bullet * @param column @details column the bullet spawns at */ void init(int column); /** Draws the bullet * @param lcd @details N5110 object */ void draw(N5110 &lcd); /** Updates the bullet location */ void update(); /** checks if the bullet needs to be deleted * @return 1 or 0 @details returns 1 if bullet needs to be deleted */ int checkdelete(); /** returns a vector with the bullet position * @return bulletxy @details Vector2D structure with the bullets xy coordinates */ Vector2D getxy(); /** returns a vector with the bullet lane and position * @return bulletxy @details Vector2D structure with the bullets lane and position */ Vector2D getcolumnpos(); private: int _column; int _x; int _y; Board _board; int _currentpos; }; #endif