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.
Revision 4:1806215c5cd8, committed 2020-05-22
- Comitter:
- Nicholas75179
- Date:
- Fri May 22 11:15:15 2020 +0000
- Parent:
- 3:4bf3fd0d3fce
- Commit message:
- Commit 2, attempt to amend faulty API documentation
Changed in this revision
Spaceship/Spaceship.h | Show annotated file Show diff for this revision Revisions of this file |
diff -r 4bf3fd0d3fce -r 1806215c5cd8 Spaceship/Spaceship.h --- a/Spaceship/Spaceship.h Fri May 22 10:45:00 2020 +0000 +++ b/Spaceship/Spaceship.h Fri May 22 11:15:15 2020 +0000 @@ -3,10 +3,8 @@ * @author Nicholas Wu * @date May, 2020 */ - #ifndef SPACESHIP_H #define SPACESHIP_H - #include "mbed.h" class Spaceship{ @@ -35,6 +33,22 @@ int HP, gun_FX, explosion_FX; // gun_FX and explosion_FX manages sound + /** Constructor + * @param pos_x and pos_y (float) are set to an arbitrary value + */ + Spaceship(){ + pos_x = 100; + pos_y = 100; + } + + /** Destructor + * @param pos_x and pos_y (float) are set to an arbitrary value + */ + ~Spaceship(){ + pos_x = 0; + pos_y = 0; + } + /** controls import from main * @param Y, A, X, B (bool) from buttons, * @param x and y (float) from left joystick.