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:
- 37:4d525a37d5d2
- Parent:
- 34:c5a042973e0c
- Child:
- 38:55bb9da08a52
--- a/Level1/Level1.cpp Fri Apr 12 03:36:04 2019 +0000
+++ b/Level1/Level1.cpp Fri Apr 12 18:10:11 2019 +0000
@@ -30,22 +30,11 @@
_sprites.soft_blocks(33, 8, lcd);
_sprites.soft_blocks(27, 8, lcd);
_sprites.soft_blocks(59, 36, lcd);
+
+ printf("trap1 x %f \n", trap1.ty);
}
-
-int Level1::traps(N5110 &lcd)
-{
- bool t = _sprites.trap(0, 25, 45, lcd);
- printf("level trap 1 %d \n", t);
- if(_sprites.trap(0, 25, 45, lcd) || _sprites.trap(1,58, 7, lcd) ||
- _sprites.trap(2, 75, 7, lcd) || _sprites.trap(3,23,7,lcd)) {
- return true;
- } else {
- return false;
- }
-}
-
int Level1::keys_collected()
{
@@ -60,4 +49,43 @@
} else {
return false;
}
+}
+
+void Level1::trap_pos()
+{
+ trap1.tx = 25;
+ trap1.ty = 44;
+
+ trap2.tx = 58;
+ trap2.ty = 6;
+
+ trap3.tx = 75;
+ trap3.ty = 6;
+
+ trap4.tx = 23;
+ trap4.ty = 6;
+
+}
+
+void Level1::key_pos()
+{
+ key1.k = 0;
+ key1.kx = 79;
+ key1.ky = 12;
+
+ key2.k = 1;
+ key2.kx = 36;
+ key2.ky = 22;
+
+ key3.k = 2;
+ key3.kx = 40;
+ key3.ky = 6;
+
+ key4.k = 3;
+ key4.kx = 62;
+ key4.ky = 6;
+
+ key5.k = 4;
+ key5.kx = 75;
+ key5.ky = 0;
}
\ No newline at end of file