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: My_game_clases/Objects.cpp
- Revision:
- 7:82079de8bcd6
- Parent:
- 6:33bdb54c2c88
- Child:
- 8:09eb8fe2bb20
--- a/My_game_clases/Objects.cpp Wed Apr 01 11:20:24 2020 +0000 +++ b/My_game_clases/Objects.cpp Thu Apr 02 11:51:44 2020 +0000 @@ -56,13 +56,13 @@ for (int i = 0; i < _shot_y_pos.size(); i++) { lcd.drawRect(_shot_x_pos[i],_shot_y_pos[i],2,2,FILL_BLACK); - // printf( " %d || %d \n",_shot_x_pos.size(),_shot_y_pos.size()); + printf( " %d || %d \n",_shot_x_pos.size(),_shot_y_pos.size()); _shot_y_pos[i] -= _shot_incrementer; // moves the shots upwards } //adds another shot if the distance between - //y pos of the initial pos and previous shot pos is more than 5 - if(_shot_y_pos[_shot_y_pos.size() - 1 ] + 5 < _initial_shot_pos && _shot_y_pos.size() < 10) { + //y pos of the initial pos and previous shot pos is more than 7 + if(_shot_y_pos[_shot_y_pos.size() - 1 ] + 7 < _initial_shot_pos && _shot_y_pos.size() < 10) { _shot_y_pos.push_back(_initial_shot_pos); _shot_x_pos.push_back(_cannon_pos + 2); }