Mateo Gomez-Randulfe / Mbed 2 deprecated The_Children_of_Cronos

Dependencies:   mbed

Fork of The_Children_of_Cronos_el15mggr by ELEC2645 (2016/17)

Embed: (wiki syntax)

« Back to documentation index

aurigaslib Class Reference

aurigaslib Class Reference

aurigaslib Class More...

#include <aurigaslib.h>

Public Member Functions

 aurigaslib ()
 Constructor.
void init ()
 sets positions and values to initial ones and generates new pipe random heights
void updatescr (DigitalOut &a, DigitalOut &b, DigitalOut &x, DigitalOut &y, Gamepad &pad)
 function that allows user to jump whithin the screen moves the pipes when the pipes get out of the screen in the left they restart in the right
void draw (N5110 &lcd)
 draws all the components and clears some pixels of the bird for improving its looking
bool touch ()
 check if any bird pixel hitted any pipe
void gameover (N5110 &lcd, Gamepad &pad, DigitalOut &l, DigitalOut &r)
 function that displays the game over screen and allows player to restart game once restarted,all values set to original ones
void leds (Gamepad &pad)
 function that switches only the same number of leds on as the same number of lifes the player still have left
int score ()

Detailed Description

aurigaslib Class

Library for the third game, Aurigas Revision 1.3

Author:
Mateo Randulfe
Date:
May 2017

Definition at line 35 of file aurigaslib.h.


Constructor & Destructor Documentation

aurigaslib (  )

Constructor.

Definition at line 6 of file aurigaslib.cpp.


Member Function Documentation

void draw ( N5110 lcd )

draws all the components and clears some pixels of the bird for improving its looking

Parameters:
lcdfor printing in the screen

Definition at line 100 of file aurigaslib.cpp.

void gameover ( N5110 lcd,
Gamepad pad,
DigitalOut &  l,
DigitalOut &  r 
)

function that displays the game over screen and allows player to restart game once restarted,all values set to original ones

Parameters:
lcdfor drawing into the screen
l/rfor restarting the game
padfor putting leds off

Definition at line 51 of file aurigaslib.cpp.

void init (  )

sets positions and values to initial ones and generates new pipe random heights

Definition at line 16 of file aurigaslib.cpp.

void leds ( Gamepad pad )

function that switches only the same number of leds on as the same number of lifes the player still have left

Parameters:
padcontrols leds

Definition at line 42 of file aurigaslib.cpp.

int score (  )
Returns:
score

Definition at line 11 of file aurigaslib.cpp.

bool touch (  )

check if any bird pixel hitted any pipe

Returns:
true if the player hits the pipes
false if he doesnt

Definition at line 81 of file aurigaslib.cpp.

void updatescr ( DigitalOut &  a,
DigitalOut &  b,
DigitalOut &  x,
DigitalOut &  y,
Gamepad pad 
)

function that allows user to jump whithin the screen moves the pipes when the pipes get out of the screen in the left they restart in the right

Parameters:
a/b/x/yjump

Definition at line 124 of file aurigaslib.cpp.