ELEC2645 (2019/20) / Mbed 2 deprecated ELEC2645_Project_el18jkeo

Dependencies:   mbed

Committer:
josh_ohara
Date:
Thu May 14 17:35:35 2020 +0000
Revision:
24:ff5af5a013b5
Parent:
20:0b6f1cfc5be6
Child:
27:eb755a345b1f
Added difficulty selection and difficulty progression with levels. FInishing touches now

Who changed what in which revision?

UserRevisionLine numberNew contents of line
josh_ohara 9:8e695df3cc36 1 #include "mbed.h"
josh_ohara 9:8e695df3cc36 2 #include "N5110.h"
josh_ohara 9:8e695df3cc36 3 #include "Gamepad.h"
josh_ohara 18:828e9f6ddfdb 4 #include "AlienBulletS.h"
josh_ohara 2:c2316b659b97 5
josh_ohara 9:8e695df3cc36 6 class Alien
josh_ohara 9:8e695df3cc36 7 {
josh_ohara 9:8e695df3cc36 8 public:
josh_ohara 24:ff5af5a013b5 9 void init(int x, int y, int size, int level);
josh_ohara 9:8e695df3cc36 10 void render(N5110 &lcd);
josh_ohara 9:8e695df3cc36 11 Vector2D get_position();
josh_ohara 24:ff5af5a013b5 12 void update(int step_x, int remainder_x, Gamepad &pad, int counter, int level);
josh_ohara 14:e88bcf5c0887 13 void set_life(bool x);
josh_ohara 15:dde4ce4bf7fe 14 bool get_life();
josh_ohara 24:ff5af5a013b5 15 void flag_set(int counter, int level);
josh_ohara 20:0b6f1cfc5be6 16 vector<AlienBullet> get_bullet_vector();
josh_ohara 20:0b6f1cfc5be6 17 void set_bullet_hit(int i, bool hit);
josh_ohara 2:c2316b659b97 18
josh_ohara 10:9189419fda68 19 private:
josh_ohara 9:8e695df3cc36 20 int X;
josh_ohara 9:8e695df3cc36 21 int Y;
josh_ohara 10:9189419fda68 22 bool Alive;
josh_ohara 9:8e695df3cc36 23 int Speed;
josh_ohara 24:ff5af5a013b5 24 float Size;
josh_ohara 13:b85f14d35be1 25 int StartX;
josh_ohara 13:b85f14d35be1 26 int StartY;
josh_ohara 17:8b1d16d56ad2 27 bool Shoot;
josh_ohara 18:828e9f6ddfdb 28 AlienBulletS alien_bullet_vector;
josh_ohara 9:8e695df3cc36 29 };