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
Wall Class Reference
#include <Wall.h>
Data Structures | |
struct | Health |
Health struct. More... | |
Public Member Functions | |
void | init (int maxHealth) |
Initialises the Wall with a max health. | |
void | draw (N5110 &lcd) |
Draws the wall on the display. | |
void | set_wall_health (int wall_health) |
sets the wall health | |
int | get_wall_health () |
Returns integer value of wall health. | |
void | take_damage (int damage) |
Does damage to the wall. |
Detailed Description
Wall Class.
- Date:
- April 2017
#include "N5110.h" #include "Wall.h" int main() { Wall _wall; //initialise wall object with 100 life _wall.init(100); //draw wall _wall.draw(lcd); //decrease walls health by 1 _wall.take_damage(1); //get wall health int wallHealth = _wall.get_wall_health() }
Definition at line 42 of file Wall.h.
Member Function Documentation
void draw | ( | N5110 & | lcd ) |
int get_wall_health | ( | ) |
void init | ( | int | maxHealth ) |
void set_wall_health | ( | int | wall_health ) |
Generated on Mon Nov 11 2024 22:48:00 by
