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
Alien/Alien.h@20:0b6f1cfc5be6, 2020-05-01 (annotated)
- Committer:
- josh_ohara
- Date:
- Fri May 01 19:41:24 2020 +0000
- Revision:
- 20:0b6f1cfc5be6
- Parent:
- 18:828e9f6ddfdb
- Child:
- 24:ff5af5a013b5
Aliens now return fire. Alien bullets now interact with ship and cover. Next to set levels and menus.
Who changed what in which revision?
| User | Revision | Line number | New 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 | 12:be491ab6e742 | 9 | void init(int x, int y, int size); |
| josh_ohara | 9:8e695df3cc36 | 10 | void render(N5110 &lcd); |
| josh_ohara | 9:8e695df3cc36 | 11 | Vector2D get_position(); |
| josh_ohara | 18:828e9f6ddfdb | 12 | void update(int step_x, int remainder_x, Gamepad &pad, int counter); |
| josh_ohara | 14:e88bcf5c0887 | 13 | void set_life(bool x); |
| josh_ohara | 15:dde4ce4bf7fe | 14 | bool get_life(); |
| josh_ohara | 18:828e9f6ddfdb | 15 | void flag_set(int counter); |
| 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 | 9:8e695df3cc36 | 24 | int 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 | }; |