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: MinerEngine/MinerEngine.cpp
- Revision:
- 9:9a30f26fed81
- Parent:
- 8:c5969685cf02
- Child:
- 10:51870f8e2e1a
--- a/MinerEngine/MinerEngine.cpp Sun Apr 26 13:17:27 2020 +0000
+++ b/MinerEngine/MinerEngine.cpp Sun Apr 26 14:00:59 2020 +0000
@@ -270,9 +270,9 @@
void MinerEngine::update(Gamepad &pad)
{
- //if (_catching==0) {
+ if (_catching==0) {
_winch.update(_d,_mag);
- // }
+ }
Vector2D winch_pos = _winch.get_pos();
_claw.update(_d,_mag,winch_pos);
wait(0.05);
@@ -292,13 +292,13 @@
Vector2D claw_pos = _claw.get_pos();
int monster_x = _monster.get_pos();
- while(_catching==1){
+ //while(_catching==1){
if (monster_x==claw_pos.x && claw_pos.y>=22) {
_monster_collision=1;
_state=4;
pad.tone(750.0,0.1);// audio feedback
}
- }
+ //}
}
void MinerEngine::check_claw_collision(Gamepad &pad)