Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed
Diff: SpaceInvaderEngine/SpaceInvaderEngine.h
- Revision:
- 11:c174d84e4866
- Parent:
- 10:9189419fda68
- Child:
- 12:be491ab6e742
--- a/SpaceInvaderEngine/SpaceInvaderEngine.h Fri Mar 27 22:58:56 2020 +0000 +++ b/SpaceInvaderEngine/SpaceInvaderEngine.h Wed Apr 01 11:23:25 2020 +0000 @@ -4,9 +4,10 @@ #include "mbed.h" #include "N5110.h" #include "Gamepad.h" -// #include "BulletS.h" +#include "BulletS.h" #include "Ship.h" #include "Alien.h" +#include <vector> #define BORDER 2 @@ -20,25 +21,28 @@ void read_input(Gamepad &pad); void update(Gamepad &pad, N5110 &lcd); void render(N5110 &lcd); + void shoot_bullet(); + void SpaceInvaderEngine::get_ship_pos(); private: -// void check_alien_collision(Gamepad &pad); - Alien A1; Ship S1; -// BulletS BS1; + BulletS BS1; int S1_height; int S1_width; int A1_size; -// int BS1_size; int A1y; -// int BS1x; + int BS1x; + int BS1y; Direction D; float Mag; + + vector<Bullet> BulletS; + };