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: shot/shot.cpp
- Revision:
- 10:02ab3324be6c
- Parent:
- 9:62d6559f0d50
- Child:
- 11:494cc44777fe
--- a/shot/shot.cpp Sat May 09 08:27:07 2020 +0000 +++ b/shot/shot.cpp Sun May 10 05:16:51 2020 +0000 @@ -62,7 +62,7 @@ } -void shot::gen_shot() +void shot::init_shot() { _p.resize(_size); for(std::vector<shot_posandtype>::iterator i = _p.begin(); i < _p.end(); i++) { @@ -132,5 +132,13 @@ return _size; } - +void shot::gen_shot(int timer_flag){ + if(get_size() < 30){ + if(timer_flag == 1){ + timer_flag = 0; + int size = get_size()+ 4; + set_size(size); + } + } +} \ No newline at end of file