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.
Monster Class Reference
#include <Monster.h>
Public Member Functions | |
| Monster () | |
| Constructor. | |
| ~Monster () | |
| Destructor. | |
| void | init (float speed) |
| Initialise the monster. | |
| void | draw (N5110 &lcd) |
| Draw the monster. | |
| void | update () |
| Update the data. | |
| void | set_pos (int x) |
| Set the position of the monster. | |
| int | get_pos () |
| Get the position of the monster. | |
| void | set_speed (float speed) |
| Set the speed of the monster. | |
| float | get_speed () |
| Get the speed of monster. | |
Detailed Description
Monster Class.
Controls the monster in the gold miner game
- Date:
- May 2020
Definition at line 14 of file Monster.h.
Constructor & Destructor Documentation
| Monster | ( | ) |
Constructor.
Definition at line 4 of file Monster.cpp.
| ~Monster | ( | ) |
Destructor.
Definition at line 8 of file Monster.cpp.
Member Function Documentation
| void draw | ( | N5110 & | lcd ) |
| int get_pos | ( | ) |
Get the position of the monster.
- Returns:
- the position of the monster.
Definition at line 41 of file Monster.cpp.
| float get_speed | ( | ) |
Get the speed of monster.
- Returns:
- the speed of the monster
Definition at line 52 of file Monster.cpp.
| void init | ( | float | speed ) |
Initialise the monster.
- Parameters:
-
speed - the speed of monster
Definition at line 14 of file Monster.cpp.
| void set_pos | ( | int | x ) |
Set the position of the monster.
- Parameters:
-
the position of the monster.
Definition at line 36 of file Monster.cpp.
| void set_speed | ( | float | speed ) |
Set the speed of the monster.
- Parameters:
-
speed - the speed of monster
Definition at line 47 of file Monster.cpp.
| void update | ( | ) |
Update the data.
Definition at line 27 of file Monster.cpp.
Generated on Sat Jul 16 2022 10:18:04 by
1.7.2