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: Level1.cpp
- Revision:
- 20:78bd235f8caa
- Parent:
- 19:4789cb4ca550
diff -r 4789cb4ca550 -r 78bd235f8caa Level1.cpp
--- a/Level1.cpp Mon Apr 01 23:55:24 2019 +0000
+++ b/Level1.cpp Tue Apr 02 23:40:28 2019 +0000
@@ -10,9 +10,9 @@
void Level1::level_platforms(N5110 &lcd)
{
- lcd.drawRect(0,HEIGHT -1,84,1,FILL_BLACK);
- lcd.drawRect(11,HEIGHT - 9, 38, 2, FILL_TRANSPARENT);
- lcd.drawRect(65,HEIGHT - 11, 30, 2, FILL_TRANSPARENT);
+ lcd.drawLine(0,47,83,47, 1);
+ lcd.drawRect(11,HEIGHT - 9, 38, 2, FILL_BLACK);
+ lcd.drawRect(65,HEIGHT - 11, 30, 2, FILL_BLACK);
lcd.drawRect(WIDTH - 9,HEIGHT - 19, 8, 2, FILL_BLACK);
lcd.drawRect(22, 25, 48, 2, FILL_BLACK);
lcd.drawRect(0, 25, 12, 2, FILL_BLACK);
@@ -52,7 +52,7 @@
int Level1::spikes(N5110 &lcd)
{
if(_level.spike1(25, 45, lcd)|| _level.spike1(58, 7, lcd) ||
- _level.spike3(75, 7, lcd) == 1){
+ _level.spike3(75, 7, lcd) == 1) {
return 1;
} else {
return 0;
@@ -63,4 +63,13 @@
{
int k =_level.keys_collected();
return k;
+}
+
+bool Level1::level1_exit(N5110 &lcd)
+{
+ if(_level.exit(78,41,lcd) == true) {
+ return true;
+ } else {
+ return false;
+ }
}
\ No newline at end of file