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.
Diff: StarcraftEngine/StarcraftEngine.cpp
- Revision:
- 2:03cd3bb32511
- Parent:
- 1:8c48fb8ca5e0
- Child:
- 3:1db91ad3ab84
--- a/StarcraftEngine/StarcraftEngine.cpp Mon May 11 06:50:18 2020 +0000 +++ b/StarcraftEngine/StarcraftEngine.cpp Tue May 12 08:01:52 2020 +0000 @@ -122,12 +122,12 @@ wait(0.1); } - if(Laser_pos.y < 6) + if ((Laser_pos.y < 6)||(Battleship_pos.y - Laser_pos.y >= 20)) { Laser_pos.x = Battleship_pos.x + 3; Laser_pos.y = Battleship_pos.y - 1; - } - + } + _Laser.set_velocity(Laser_velocity); _Swarm.set_velocity(Swarm_velocity); _Laser.set_pos(Laser_pos);