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
shot Class Reference
shot class More...
#include <shot.h>
Public Member Functions | |
| shot () | |
| constructor | |
| ~shot () | |
| destructor | |
| void | init () |
| generate first 7 shots vector include position type direction by iterating through the vector | |
| void | init_pos (shot_posandtype *i) |
| produce a init position of shots((21,0);(42,0);(63,0);(21,45);(42,45);(63,45)) | |
| void | update () |
| update shots in their directions | |
| void | update_shot () |
| resize shots as time goes on generate shots in empty vector | |
| void | draw (N5110 &lcd) |
| draw updated shots iterating through the vector | |
| void | delete_shot () |
| if beyoud border, delete it and generate new one, keep total number constant | |
| void | gen_shot (int timer_flag, float increment, int max) |
| control difficulty of game(size) | |
| void | set_size (int size) |
| accessors set the size of shots | |
| void | set_shot (int x, int y, int type, int Direction) |
| accessors create a shot vector for testing | |
| int | get_size () |
| mutators get size | |
| Vector2D | get_shot () |
| mutators get position of the shot for testing | |
Detailed Description
shot class
set several kinds of shot and come from all around
Definition at line 24 of file shot.h.
Constructor & Destructor Documentation
Member Function Documentation
| void delete_shot | ( | ) |
| void draw | ( | N5110 & | lcd ) |
| void gen_shot | ( | int | timer_flag, |
| float | increment, | ||
| int | max | ||
| ) |
| Vector2D get_shot | ( | ) |
| void init | ( | ) |
| void init_pos | ( | shot_posandtype * | i ) |
| void set_shot | ( | int | x, |
| int | y, | ||
| int | type, | ||
| int | Direction | ||
| ) |
| void set_size | ( | int | size ) |
Generated on Thu Jul 14 2022 12:45:25 by
1.7.2