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.
Dependencies: mbed Gamepad N5110
Blockhead Class Reference
#include <Blockhead.h>
Public Member Functions | |
Blockhead () | |
Constructor. | |
~Blockhead () | |
Deconstructor. | |
void | init () |
initialises all variables for new game | |
void | continue_init () |
initialises variables for continue game (does not intialise level) | |
int | next_level () |
changes level when character reaches side of screen | |
void | blockhead (Pos pos, N5110 &lcd, Gamepad &pad) |
controlls blockhead depending on position in game, and user input | |
int | gameover_flag (Gamepad &pad) |
retruns 1 when gameover occurs |
Detailed Description
Blockhead Class.
Class for controlling the main mechanics of the Blockhead character
- Date:
- 9 May 2019
Definition at line 16 of file Blockhead.h.
Constructor & Destructor Documentation
Blockhead | ( | ) |
Constructor.
Definition at line 7 of file Blockhead.cpp.
~Blockhead | ( | ) |
Deconstructor.
Definition at line 12 of file Blockhead.cpp.
Member Function Documentation
void blockhead | ( | Pos | pos, |
N5110 & | lcd, | ||
Gamepad & | pad | ||
) |
controlls blockhead depending on position in game, and user input
- Parameters:
-
pos struct which contains cordinates and direction of moving platforms N5110 class which controlls lcd screen Gamepad class for working with the gamepad
Definition at line 63 of file Blockhead.cpp.
void continue_init | ( | ) |
initialises variables for continue game (does not intialise level)
Definition at line 38 of file Blockhead.cpp.
int gameover_flag | ( | Gamepad & | pad ) |
retruns 1 when gameover occurs
- Parameters:
-
Gamepad class for working with the gamepad
- Returns:
- gameover (0 when alive, 1 once died) (int)
Definition at line 92 of file Blockhead.cpp.
void init | ( | ) |
initialises all variables for new game
Definition at line 19 of file Blockhead.cpp.
int next_level | ( | ) |
changes level when character reaches side of screen
- Returns:
- level blockhead is on (int)
Definition at line 527 of file Blockhead.cpp.
Generated on Fri Jul 15 2022 00:42:15 by
