Nemesis game, sixth enemy
Enemy6 Class Reference
#include <Enemy6.h>
Public Member Functions | |
| Enemy6 () | |
| Constructor and destructor: | |
| void | init (int speed) |
| Initialize Enemy6. | |
| void | draw (N5110 &lcd) |
| Draw Enemy6. | |
| void | update () |
| Update Enemy6. | |
| Vector2D | get_pos () |
| Get Enemy6 Position. | |
Detailed Description
Enemy6 Class.
Used for generating the sixth enemy ship in the Nemesis game. Includes drawing and updating functions. Incorporates N5110.h file by Craig A. Evans.
Revision 1.0
- Date:
- 3rd May 2017
Definition at line 20 of file Enemy6.h.
Constructor & Destructor Documentation
| Enemy6 | ( | ) |
Constructor and destructor:
Definition at line 3 of file Enemy6.cpp.
Member Function Documentation
| void draw | ( | N5110 & | lcd ) |
Draw Enemy6.
Draws the sixth enemy ship onto the LCD, in accordance with the parameters initialized in the "init" method.
- Parameters:
-
N5110 - nokia LCD library lcd - pointer to nokia LCD library
Definition at line 26 of file Enemy6.cpp.
| Vector2D get_pos | ( | ) |
Get Enemy6 Position.
Obtains the position (x and y coordinates) of the sixth enemy ship at any given time, into a two-dimensional vector.
- Returns:
- p - the Vector2D of the parameters
Definition at line 48 of file Enemy6.cpp.
| void init | ( | int | speed ) |
Initialize Enemy6.
Initializes sixth enemy ship x (random) & y (fixed) positions, as well as speed.
Definition at line 14 of file Enemy6.cpp.
| void update | ( | ) |
Update Enemy6.
Updates the sixth enemy ship's x and y position. X and y positions are altered by adding speeds.
Definition at line 38 of file Enemy6.cpp.
Generated on Sun Jul 17 2022 08:41:25 by
1.7.2