ELEC2645 (2019/20) / Mbed 2 deprecated ELEC2645_Project_el18jkeo

Dependencies:   mbed

Committer:
josh_ohara
Date:
Fri Apr 03 11:19:53 2020 +0000
Revision:
14:e88bcf5c0887
Parent:
12:be491ab6e742
Child:
15:dde4ce4bf7fe
Bullet and aliens now functioning correctly. Collision function completed using get_position method instead of checking if pixels were black (finally). Space invaders must use this method as we want alien bullets to go through aliens without collsion

Who changed what in which revision?

UserRevisionLine numberNew contents of line
josh_ohara 2:c2316b659b97 1
josh_ohara 11:c174d84e4866 2 #include "mbed.h"
josh_ohara 11:c174d84e4866 3 #include "N5110.h"
josh_ohara 11:c174d84e4866 4 #include "Gamepad.h"
josh_ohara 11:c174d84e4866 5 #include "Bullet.h"
josh_ohara 11:c174d84e4866 6 #include <vector>
josh_ohara 2:c2316b659b97 7
josh_ohara 11:c174d84e4866 8 class BulletS
josh_ohara 11:c174d84e4866 9 {
josh_ohara 11:c174d84e4866 10 public:
josh_ohara 11:c174d84e4866 11 BulletS();
josh_ohara 11:c174d84e4866 12 ~BulletS();
josh_ohara 11:c174d84e4866 13 void init();
josh_ohara 11:c174d84e4866 14 void render(N5110 &lcd);
josh_ohara 12:be491ab6e742 15 void update(Gamepad &pad, N5110 &lcd, int shipx, int shipy);
josh_ohara 14:e88bcf5c0887 16 vector<Bullet> get_vector();
josh_ohara 14:e88bcf5c0887 17 void set_hit(int i, bool x);
josh_ohara 11:c174d84e4866 18
josh_ohara 11:c174d84e4866 19 private:
josh_ohara 11:c174d84e4866 20 vector<Bullet> bullet_vector;
josh_ohara 11:c174d84e4866 21 int X;
josh_ohara 11:c174d84e4866 22 int Y;
josh_ohara 11:c174d84e4866 23 int Shot;
josh_ohara 11:c174d84e4866 24 };