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: Game/Game.cpp
- Revision:
- 7:fa8629d7bb6e
- Parent:
- 5:e6cb6fda5b37
--- a/Game/Game.cpp Tue Apr 23 16:08:23 2019 +0000
+++ b/Game/Game.cpp Sun Apr 28 12:41:56 2019 +0000
@@ -9,12 +9,11 @@
}
void Game::init(){
- smiley.init(x,y);
+ smiley.init(x,y,width,height);
}
void Game::dirmag(Gamepad &pad){
dir = pad.get_direction();
- mag = pad.get_mag();
}
void Game::drawSprite(N5110 &lcd){
@@ -23,5 +22,9 @@
}
void Game::movement(Gamepad &pad){
- smiley.movement(dir,mag);
+ smiley.movement(dir);
+}
+
+void Game::allCollisions(N5110 &lcd,Gamepad &pad){
+ mazecollisions.collisions(smiley,maze,pad);
}
\ No newline at end of file