ELEC2645 (2018/19) / Mbed 2 deprecated el17ntkv

Dependencies:   mbed

Embed: (wiki syntax)

« Back to documentation index

Charactersprites Class Reference

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.

Author:
Mr Nigel TK Vere, University of Leeds Controls and models the fruit characters used in the game main character for the badman game
Date:
April 2019 Charactersprites Class

Controls and models the fruit characters used in the game main character for the badman game

Version:
1.0
Author:
Mr Nigel TK Vere
Date:
April 2019

Definition at line 27 of file Charactersprites.h.


Constructor & Destructor Documentation

Default Charactersprite object constructor.

Definition at line 4 of file Charactersprites.cpp.

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:
lcdRefrence 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:
xInteger value representing the value of the x coordinate of the top left corner of the charactersprite object on the screen
yInteger value representing the value of the y coordinate of the top left corner of the charactersprite object on the screen
numInteger value representing the specific charactersprite object to be initialised and drawn subsequently on the screen

Definition at line 14 of file Charactersprites.cpp.