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.
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
@ 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 | ( | ) |
| ~RooneyEngine | ( | ) |
Member Function Documentation
| void check_collision | ( | Gamepad & | gamepad ) |
check and flesh the collision flag.
- Parameters:
-
&gamepad The gamepad object from Gamepad class.
Definition at line 59 of file RooneyEngine.cpp.
check and flesh the reset flag.
Definition at line 38 of file RooneyEngine.cpp.
check and flesh the start flag.
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:
-
&gamepad The 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.
run the game.
Definition at line 104 of file RooneyEngine.cpp.
| void update_lcd | ( | N5110 & | lcd ) |
Updates the LCD display.
- Parameters:
-
&lcd The lcd object from the N5110 class.
Definition at line 72 of file RooneyEngine.cpp.
Generated on Sat Jul 23 2022 06:49:37 by
1.7.2