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
Badman Class Reference
#include <Badman.h>
Public Member Functions | |
| Badman () | |
| Default Badman object constructor. | |
| ~Badman () | |
| Default Badman object destructor. | |
| void | init (int size) |
| Mutator method initialises the badman character object setting it's radius and start position in the maze. | |
| void | draw (N5110 &lcd) |
| Mutator method gets displays the badman character on the lcd screen dependent on it's current x and y coordinates and size. | |
| Vector2D | getPos () |
| Accessor method gets the current coordinates of the badman character object. | |
| void | setPos (int x, int y) |
| Mutator method gets the current x and y coordinate of the badman object to the coordinate passed in the function call. | |
| int | getSize () |
| Accessor method gets the size of badman character object. | |
Detailed Description
Badman Class.
- Date:
- April 2019 Badman Class
Controls and models the badman main character for the badman game
- Version:
- 1.0
- Date:
- April 2019
Definition at line 27 of file Badman.h.
Constructor & Destructor Documentation
| Badman | ( | ) |
Default Badman object constructor.
Definition at line 5 of file Badman.cpp.
| ~Badman | ( | ) |
Default Badman object destructor.
Definition at line 9 of file Badman.cpp.
Member Function Documentation
| void draw | ( | N5110 & | lcd ) |
Mutator method gets displays the badman character on the lcd screen dependent on it's current x and y coordinates and size.
- Parameters:
-
lcd Refrence NOKIA 5110 LCD screen object
Definition at line 22 of file Badman.cpp.
| Vector2D getPos | ( | ) |
Accessor method gets the current coordinates of the badman character object.
- Returns:
- Returns the Vector data type holding the current x and y coordinates of the badman character object's centre
Definition at line 27 of file Badman.cpp.
| int getSize | ( | ) |
Accessor method gets the size of badman character object.
- Returns:
- Returns the size(radius ) of the badman character object
Definition at line 41 of file Badman.cpp.
| void init | ( | int | size ) |
Mutator method initialises the badman character object setting it's radius and start position in the maze.
- Parameters:
-
size Integer value giving the radius of our badman character object
Definition at line 14 of file Badman.cpp.
| void setPos | ( | int | x, |
| int | y | ||
| ) |
Mutator method gets the current x and y coordinate of the badman object to the coordinate passed in the function call.
- Parameters:
-
x X coordinate value of the new position the badman character object is to move to y Y coordinate value of the new position the badman character object is to move to
Definition at line 34 of file Badman.cpp.
Generated on Thu Aug 4 2022 12:05:20 by
1.7.2