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:
- 18:ba4159ab4da7
- Parent:
- 17:ce6b54422113
- Child:
- 19:1073cc64cb0b
--- a/Game/Game.cpp Wed May 08 13:03:24 2019 +0000 +++ b/Game/Game.cpp Wed May 08 15:01:45 2019 +0000 @@ -10,7 +10,10 @@ void Game::init(){ smiley.init(x,y); - _lives = 1; + _lives = 3; + coin1.init(41, 42); + coin2.init(41, 23); + coin3.init(81, 42); } void Game::dirmag(Gamepad &pad){ @@ -22,7 +25,9 @@ maze.drawSprite(lcd); enemy1.drawSprite(lcd); enemy2.drawSprite(lcd); - coin.drawSprite(lcd); + coin1.drawSprite(lcd); + coin2.drawSprite(lcd); + coin3.drawSprite(lcd); smiley.drawSprite(lcd); } @@ -35,7 +40,7 @@ void Game::collect(N5110 &lcd, Gamepad &pad){ int x = smiley.get_x_char(); int y = smiley.get_y_char(); - coin.spawn(x, y, lcd, pad); + coin1.spawn(x, y, lcd, pad); } void Game::damage(N5110 &lcd, Gamepad &pad){