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@15:dde4ce4bf7fe, 2020-04-06 (annotated)
- Committer:
- josh_ohara
- Date:
- Mon Apr 06 15:37:02 2020 +0000
- Revision:
- 15:dde4ce4bf7fe
- Parent:
- 14:e88bcf5c0887
- Child:
- 17:8b1d16d56ad2
Cover for ship completed. Next task is to add timeout to the ship bullet
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 | 2:c2316b659b97 | 4 | |
| josh_ohara | 9:8e695df3cc36 | 5 | class Alien |
| josh_ohara | 9:8e695df3cc36 | 6 | { |
| josh_ohara | 9:8e695df3cc36 | 7 | public: |
| josh_ohara | 12:be491ab6e742 | 8 | void init(int x, int y, int size); |
| josh_ohara | 9:8e695df3cc36 | 9 | void render(N5110 &lcd); |
| josh_ohara | 9:8e695df3cc36 | 10 | Vector2D get_position(); |
| josh_ohara | 14:e88bcf5c0887 | 11 | void update(int step_x, int remainder_x, Gamepad &pad); |
| josh_ohara | 14:e88bcf5c0887 | 12 | void set_life(bool x); |
| josh_ohara | 15:dde4ce4bf7fe | 13 | bool get_life(); |
| josh_ohara | 2:c2316b659b97 | 14 | |
| josh_ohara | 10:9189419fda68 | 15 | private: |
| josh_ohara | 9:8e695df3cc36 | 16 | int X; |
| josh_ohara | 9:8e695df3cc36 | 17 | int Y; |
| josh_ohara | 10:9189419fda68 | 18 | bool Alive; |
| josh_ohara | 9:8e695df3cc36 | 19 | int Speed; |
| josh_ohara | 9:8e695df3cc36 | 20 | int Size; |
| josh_ohara | 13:b85f14d35be1 | 21 | int StartX; |
| josh_ohara | 13:b85f14d35be1 | 22 | int StartY; |
| josh_ohara | 9:8e695df3cc36 | 23 | }; |