Arturs Kozlovskis 201253737

Dependencies:   mbed

Embed: (wiki syntax)

« Back to documentation index

Objects Class Reference

Objects Class Reference

Objects class. More...

#include <Objects.h>

Public Member Functions

 Objects ()
 Constructor.
void draw_base (N5110 &lcd)
 Draw the base of the game.
void cannon_position (Gamepad &pad)
 Update the cannon position.
void draw_cannon (N5110 &lcd)
 Draw a cannon.
void draw_shots (N5110 &lcd, Gamepad &pad, bool c)
 Draw shots.
void draw_ball (N5110 &lcd, int ball_x, int ball_y, int delta_r)
 Draw ball.
int get_size ()
 Get size value of _shot_y_pos vector.
int get_x_value (int i)
 Get x value.
int get_y_value (int i)
 Get y value.
void erase_shot (int i)
 Erase a shot.
int get_x_cannon ()
 Get cannon x position.

Detailed Description

Objects class.

draws game objects on the lcd screen

Author:
Arturs Kozlovskis
Date:
April,2020

Definition at line 14 of file Objects.h.


Constructor & Destructor Documentation

Objects (  )

Constructor.

Definition at line 17 of file Objects.cpp.


Member Function Documentation

void cannon_position ( Gamepad pad )

Update the cannon position.

Parameters:
Gamepadclass object

Definition at line 32 of file Objects.cpp.

void draw_ball ( N5110 lcd,
int  ball_x,
int  ball_y,
int  delta_r 
)

Draw ball.

Parameters:
N5110calss object
ball_xball x position(int)
ball_yball y position(int)
delta_rball's radiuss(int)

Definition at line 81 of file Objects.cpp.

void draw_base ( N5110 lcd )

Draw the base of the game.

Parameters:
N5110class object

Definition at line 27 of file Objects.cpp.

void draw_cannon ( N5110 lcd )

Draw a cannon.

Parameters:
N5110class object

Definition at line 52 of file Objects.cpp.

void draw_shots ( N5110 lcd,
Gamepad pad,
bool  c 
)

Draw shots.

Parameters:
N5110class object
Gamepadclass object
cif an update of position is needed value(bool)

Definition at line 57 of file Objects.cpp.

void erase_shot ( int  i )

Erase a shot.

Parameters:
iwhich shot value to erase(int)

Definition at line 101 of file Objects.cpp.

int get_size (  )

Get size value of _shot_y_pos vector.

Returns:
size of vector

Definition at line 86 of file Objects.cpp.

int get_x_cannon (  )

Get cannon x position.

Returns:
cannon x position

Definition at line 107 of file Objects.cpp.

int get_x_value ( int  i )

Get x value.

Parameters:
iwhich shot value to return(int)
Returns:
shot x value

Definition at line 91 of file Objects.cpp.

int get_y_value ( int  i )

Get y value.

Parameters:
iwhich shot value to return(int)
Returns:
shot y value

Definition at line 96 of file Objects.cpp.