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
Charactersprites Class Reference
Charactersprites Class. More...
#include <Charactersprites.h>
Public Member Functions | |
| Charactersprites () | |
| Default Charactersprite object constructor. | |
| ~Charactersprites () | |
| Default Charactersprite object destructor. | |
| void | displaySprite (N5110 &lcd) |
| Mutator method displays the charactersprite object on the lcd screen dependent on it's current x and y coordinates and the respective object type. | |
| void | init (int x, int y, int num) |
| Mutator method initialises the charactersprite object setting it's top left corner x and y coordinates and the type of object to be drawn. | |
| int | getValue () |
| Accessor method gets the type value of the charactersrpite object. | |
| Vector2D | getTopr () |
| Accessor method gets the coordinates of the top right corner of charactersrpite object. | |
| Vector2D | getBottr () |
| Accessor method gets the coordinates of the bottom right corner of charactersrpite object. | |
| Vector2D | getBottl () |
| Accessor method gets the coordinates of the bottom left corner of charactersrpite object. | |
| Vector2D | getTopl () |
| Accessor method gets the coordinates of the top left corner of charactersrpite object. | |
Detailed Description
Charactersprites Class.
- Date:
- April 2019 Charactersprites Class
Controls and models the fruit characters used in the game main character for the badman game
- Version:
- 1.0
- Date:
- April 2019
Definition at line 27 of file Charactersprites.h.
Constructor & Destructor Documentation
| Charactersprites | ( | ) |
Default Charactersprite object constructor.
Definition at line 4 of file Charactersprites.cpp.
| ~Charactersprites | ( | ) |
Default Charactersprite object destructor.
Definition at line 8 of file Charactersprites.cpp.
Member Function Documentation
| void displaySprite | ( | N5110 & | lcd ) |
Mutator method displays the charactersprite object on the lcd screen dependent on it's current x and y coordinates and the respective object type.
- Parameters:
-
lcd Refrence NOKIA 5110 LCD screen object
Definition at line 40 of file Charactersprites.cpp.
| Vector2D getBottl | ( | ) |
Accessor method gets the coordinates of the bottom left corner of charactersrpite object.
- Returns:
- Returns the bottom left hand coordinates(_bottl private variable ) of the charactersprite object as a Vector2D object
Definition at line 85 of file Charactersprites.cpp.
| Vector2D getBottr | ( | ) |
Accessor method gets the coordinates of the bottom right corner of charactersrpite object.
- Returns:
- Returns the bottom right hand corner coordinates(_bottr private variable ) of the charactersprite object as a Vector2D object
Definition at line 79 of file Charactersprites.cpp.
| Vector2D getTopl | ( | ) |
Accessor method gets the coordinates of the top left corner of charactersrpite object.
- Returns:
- Returns the top left hand corner coordinates(_topl private variable ) of the charactersprite object as a Vector2D object
Definition at line 91 of file Charactersprites.cpp.
| Vector2D getTopr | ( | ) |
Accessor method gets the coordinates of the top right corner of charactersrpite object.
- Returns:
- Returns the top right hand coordinates(_topr private variable ) of the charactersprite object as a Vector2D object
Definition at line 73 of file Charactersprites.cpp.
| int getValue | ( | ) |
Accessor method gets the type value of the charactersrpite object.
- Returns:
- Returns the type(_value private variable ) of the charactersprite object
Definition at line 67 of file Charactersprites.cpp.
| void init | ( | int | x, |
| int | y, | ||
| int | num | ||
| ) |
Mutator method initialises the charactersprite object setting it's top left corner x and y coordinates and the type of object to be drawn.
- Parameters:
-
x Integer value representing the value of the x coordinate of the top left corner of the charactersprite object on the screen y Integer value representing the value of the y coordinate of the top left corner of the charactersprite object on the screen num Integer value representing the specific charactersprite object to be initialised and drawn subsequently on the screen
Definition at line 14 of file Charactersprites.cpp.
Generated on Thu Aug 4 2022 12:05:20 by
1.7.2