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: SpaceInvaderEngine/SpaceInvaderEngine.cpp
- Revision:
- 9:8e695df3cc36
- Parent:
- 8:86cb9a9f8a73
- Child:
- 10:9189419fda68
--- a/SpaceInvaderEngine/SpaceInvaderEngine.cpp Thu Mar 26 15:24:49 2020 +0000 +++ b/SpaceInvaderEngine/SpaceInvaderEngine.cpp Fri Mar 27 11:55:53 2020 +0000 @@ -13,19 +13,18 @@ } -void SpaceInvaderEngine::init(int ship_height, int ship_width) { -// int ship_bullet_size, int alien_size) { +void SpaceInvaderEngine::init(int ship_height, int ship_width, int alien_size) { S1_height = ship_height; S1_width = ship_width; -// A1_size = alien_size; + A1_size = alien_size; // BS1_size = ship_bullet_size; -// A1y = BORDER + 5; + A1y = BORDER + 5; // Vector2D ship_pos = S1.get_position; // BS1x = ship_pos.x; -// A1.init(A1y,A1_size); + A1.init(A1y,A1_size); S1.init(S1_height,S1_width); // BS1.init(BS1_size,BS1x); @@ -44,10 +43,12 @@ void SpaceInvaderEngine::render(N5110 &lcd) { S1.render(lcd); + A1.render(lcd); } void SpaceInvaderEngine::update(Gamepad &pad) { S1.update(D,Mag); + A1.update(); }