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
ScreenArray Class Reference
ScreenArray Class. More...
#include <ScreenArray.h>
Public Member Functions | |
| ScreenArray () | |
| ScreenArray object donstructor. | |
| ~ScreenArray () | |
| ScreenArray object destructor. | |
| void | init () |
| Mutator method initialises the screenarray object by filling the integer array with zeros. | |
| int | get (int x, int y) |
| //Accessor method returns the value of the element at the array poisiton denoted by the x and y coordinates(columns and rows value) passed as the method parameter | |
| void | set (int x, int y, int type) |
| Mutator method sets the array element at the position denoted by the x and y coordinates(columns and rows value) to the type(integer value) passed as the method's parameters. | |
| void | setRange (int x, int y, int width, int height, int type) |
| //Mutator method sets all the elements within the region of elements within the screen array to the type passed as the method parameter call | |
Detailed Description
ScreenArray Class.
- Date:
- April 2019ScreenArray Class
ScreenArray class used for collision detection and score detection within the badman game
- Version:
- 1.0
- Date:
- April 2019
Definition at line 27 of file ScreenArray.h.
Constructor & Destructor Documentation
| ScreenArray | ( | ) |
ScreenArray object donstructor.
Definition at line 4 of file ScreenArray.cpp.
| ~ScreenArray | ( | ) |
ScreenArray object destructor.
Definition at line 7 of file ScreenArray.cpp.
Member Function Documentation
| int get | ( | int | x, |
| int | y | ||
| ) |
//Accessor method returns the value of the element at the array poisiton denoted by the x and y coordinates(columns and rows value) passed as the method parameter
- Parameters:
-
x X coordinate value of the screen position whose value we wish to retrieve y Y coordinate value of the screen position whose value we wish to retrieve
Definition at line 25 of file ScreenArray.cpp.
| void init | ( | ) |
Mutator method initialises the screenarray object by filling the integer array with zeros.
Definition at line 12 of file ScreenArray.cpp.
| void set | ( | int | x, |
| int | y, | ||
| int | type | ||
| ) |
Mutator method sets the array element at the position denoted by the x and y coordinates(columns and rows value) to the type(integer value) passed as the method's parameters.
- Parameters:
-
x Integer X coordinate value of the screen position whose value we wish to alter y Integer Y coordinate value of the screen position whose value we wish to alter type Integer value denoting the type of object at this point in the grid
Definition at line 32 of file ScreenArray.cpp.
| void setRange | ( | int | x, |
| int | y, | ||
| int | width, | ||
| int | height, | ||
| int | type | ||
| ) |
//Mutator method sets all the elements within the region of elements within the screen array to the type passed as the method parameter call
- Parameters:
-
x Integer X coordinate value of the screen position whose value we wish to alter y Integer Y coordinate value of the screen position whose value we wish to alter width Integer value denoting the width of the screen array region that needs to be altered height Integer value denoting the height of the screen array region that needs to be altered type Integer value denoting the type of object at this point in the grid
Definition at line 39 of file ScreenArray.cpp.
Generated on Thu Aug 4 2022 12:05:20 by
1.7.2