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
Diff: Levelengine.cpp
- Revision:
- 20:78bd235f8caa
- Parent:
- 19:4789cb4ca550
diff -r 4789cb4ca550 -r 78bd235f8caa Levelengine.cpp
--- a/Levelengine.cpp Mon Apr 01 23:55:24 2019 +0000
+++ b/Levelengine.cpp Tue Apr 02 23:40:28 2019 +0000
@@ -137,4 +137,16 @@
} else {
return 0;
}
+}
+
+bool Levelengine::exit(int x, int y, N5110 &lcd)
+{
+ lcd.drawSprite(x,y,6,5,(int *)door);
+
+ if(_keys == 0 && lcd.getPixel(x-1, y+5) == 1) {
+ return true;
+ } else {
+ return false;
+
+ }
}
\ No newline at end of file