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/Level1.cpp
- Revision:
- 27:e73dd64ef334
- Parent:
- 26:bce40bf4c9fc
- Child:
- 31:ed5f7f15a1ed
- Child:
- 32:5dc769ba4a58
--- a/Level1/Level1.cpp Tue Apr 09 01:36:47 2019 +0000
+++ b/Level1/Level1.cpp Tue Apr 09 18:46:14 2019 +0000
@@ -33,7 +33,7 @@
}
void Level1::solid_blocks(N5110 &lcd)
-{
+{
_level.draw_solid_block(49,37, lcd);
_level.draw_solid_block(52,37, lcd);
_level.draw_solid_block(45,22, lcd);
@@ -63,6 +63,7 @@
int Level1::keys_collected()
{
+
int k =_level.keys_collected();
return k;
}
@@ -74,36 +75,4 @@
} else {
return false;
}
-}
-
-void Level1::enemy_init(int x, int y, int d)
-{
- _x = x;
- _y = y;
- _d = d;
-
-}
-
-void Level1::enemies_right(N5110 &lcd)
-{
- lcd.drawSprite(_x,_y,5,3, (int *) enemy);
- if (lcd.getPixel(_x+3,_y+4) == 0 && _d == 0) {
- _x = _x + 0.25;
- }
- if (lcd.getPixel(_x+3,_y+4) == 1) {
- _d = 1;
- }
-}
-
-void Level1::enemies_left(N5110 &lcd)
-{
- if (_d == 1 && lcd.getPixel(_x, _y +5) == 1) {
- _x = _x - 0.25;
- }
- if (lcd.getPixel(_x,_y+5) == 0) {
- _d = 0;
- }
- printf("_d = %i \n", _d);
- printf("pixel = %i \n", lcd.getPixel(_x+3,_y+5));
-}
-
+}
\ No newline at end of file