zhenye yang / Mbed 2 deprecated el17zy

Dependencies:   mbed

Embed: (wiki syntax)

« Back to documentation index

RooneyEngine Class Reference

RooneyEngine Class Reference

RooneyEngine class @1 make the whole game run and set the score the reset process @2 cheak the collision and the reset or fall flag @3 draw on the lcd screen and load the gamepad controll. More...

#include <RooneyEngine.h>

Public Member Functions

 RooneyEngine ()
 Constructor.
 ~RooneyEngine ()
 Destructor.
void init ()
 Initalises the RooneyEngine.
void reset ()
 reset the RooneyEngine.
void read_input (Gamepad &pad)
 get the coordinate and the button_flag.
void check_reset (N5110 &lcd, Gamepad &gamepad)
 check and flesh the reset flag.
void check_start (N5110 &lcd, Gamepad &gamepad)
 check and flesh the start flag.
void check_collision (Gamepad &gamepad)
 check and flesh the collision flag.
int get_score ()
 get the player score.
int get_speed ()
 get the player speed.
void get_sprite (N5110 &lcd)
 get the sprite.
void update_lcd (N5110 &lcd)
 Updates the LCD display.
void run_engine (N5110 &lcd, Gamepad &gamepad)
 run the game.
bool get_reset_flag ()
 get the reset flag.
bool get_start_flag ()
 get the start flag.
void get_rooney_x (Gamepad &gamepad, int speed, float joy_x)
 get player's x

Detailed Description

RooneyEngine class @1 make the whole game run and set the score the reset process @2 cheak the collision and the reset or fall flag @3 draw on the lcd screen and load the gamepad controll.

Date:
May 14th 2020
Author:
Yang Zhenye

@ code

include "mbed.h" include "N5110.h" include "Gamepad.h" include "RooneyEngine.h"

Definition at line 33 of file RooneyEngine.h.


Constructor & Destructor Documentation

RooneyEngine (  )

Constructor.

Non user specified.

Definition at line 16 of file RooneyEngine.cpp.

~RooneyEngine (  )

Destructor.

Non user specified.

Definition at line 17 of file RooneyEngine.cpp.


Member Function Documentation

void check_collision ( Gamepad gamepad )

check and flesh the collision flag.

Parameters:
&gamepadThe gamepad object from Gamepad class.

Definition at line 59 of file RooneyEngine.cpp.

void check_reset ( N5110 lcd,
Gamepad gamepad 
)

check and flesh the reset flag.

Parameters:
&gamepadThe gamepad object from Gamepad class.
&lcdThe lcd object from the N5110 class

Definition at line 38 of file RooneyEngine.cpp.

void check_start ( N5110 lcd,
Gamepad gamepad 
)

check and flesh the start flag.

Parameters:
&gamepadThe gamepad object from Gamepad class.
&lcdThe lcd object from the N5110 class

Definition at line 53 of file RooneyEngine.cpp.

bool get_reset_flag (  )

get the reset flag.

Definition at line 96 of file RooneyEngine.cpp.

void get_rooney_x ( Gamepad gamepad,
int  speed,
float  joy_x 
)

get player's x

Definition at line 81 of file RooneyEngine.cpp.

int get_score (  )

get the player score.

Definition at line 66 of file RooneyEngine.cpp.

int get_speed (  )

get the player speed.

Definition at line 79 of file RooneyEngine.cpp.

void get_sprite ( N5110 lcd )

get the sprite.

Definition at line 69 of file RooneyEngine.cpp.

bool get_start_flag (  )

get the start flag.

Definition at line 100 of file RooneyEngine.cpp.

void init (  )

Initalises the RooneyEngine.

Definition at line 18 of file RooneyEngine.cpp.

void read_input ( Gamepad pad )

get the coordinate and the button_flag.

Parameters:
&gamepadThe gamepad object from Gamepad class.

Definition at line 33 of file RooneyEngine.cpp.

void reset (  )

reset the RooneyEngine.

Definition at line 23 of file RooneyEngine.cpp.

void run_engine ( N5110 lcd,
Gamepad gamepad 
)

run the game.

Definition at line 104 of file RooneyEngine.cpp.

void update_lcd ( N5110 lcd )

Updates the LCD display.

Parameters:
&lcdThe lcd object from the N5110 class.

Definition at line 72 of file RooneyEngine.cpp.