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: RosenEngine/RosenEngine.cpp
- Revision:
- 15:009ccc07bb57
- Parent:
- 14:88ca5b1a111a
- Child:
- 17:e65a9f981834
diff -r 88ca5b1a111a -r 009ccc07bb57 RosenEngine/RosenEngine.cpp --- a/RosenEngine/RosenEngine.cpp Wed Apr 10 18:50:17 2019 +0000 +++ b/RosenEngine/RosenEngine.cpp Thu Apr 11 06:48:52 2019 +0000 @@ -17,6 +17,8 @@ { // initialise the game parameters _ship.init(ship_width,ship_height,ship_speed,ship_xpos,ship_ypos); + // place seeker above the ship + _enemy.init(ship_xpos, 0); _menu.init(16); } @@ -32,6 +34,7 @@ void RosenEngine::draw(N5110 &lcd, Gamepad &pad) { + _enemy.draw_seeker(lcd); if(_xcursor == 0) { _ship.set_dimensions(9,6); _ship.draw_ship(lcd); @@ -61,6 +64,7 @@ void RosenEngine::update(Gamepad &pad) { + _enemy.update_seeker(ship_xpos, ship_ypos); if(_xcursor == 0) { _ship.update_ship(_xjoystick,_yjoystick); _weapons.update();