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.h
- Revision:
- 5:6774b7272e85
- Parent:
- 4:b12a49f0b730
- Child:
- 6:dce38fe4e092
--- a/shot/shot.h Tue Apr 14 05:47:23 2020 +0000 +++ b/shot/shot.h Tue Apr 14 06:39:11 2020 +0000 @@ -11,6 +11,12 @@ @author Zeyu Feng @13 April 2020 */ +struct shot_posandtype{ + int x; + int y; + int type; + int dir; +}; class shot { @@ -20,7 +26,7 @@ //destructor ~shot(); - void init(); + void init(N5110 &lcd); int rand_dir();//random direction of shot @@ -28,14 +34,14 @@ void gen_shot();//3 types direction - void shot_move(); + void update(N5110 &lcd); void draw(N5110 &lcd); private: - std::vector<Vector2D> _p; + std::vector<shot_posandtype> _p;