Nemesis game, first enemy
Enemy1 Class Reference
#include <Enemy1.h>
Public Member Functions | |
| Enemy1 () | |
| Constructor and destructor: | |
| void | init (int speed) |
| Initialize Enemy1. | |
| void | draw (N5110 &lcd) |
| Draw Enemy1. | |
| void | update () |
| Update Enemy1. | |
| Vector2D | get_pos () |
| Get Enemy1 Position. | |
Detailed Description
Enemy1 Class.
Used for generating the first 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 Enemy1.h.
Constructor & Destructor Documentation
| Enemy1 | ( | ) |
Constructor and destructor:
Definition at line 3 of file Enemy1.cpp.
Member Function Documentation
| void draw | ( | N5110 & | lcd ) |
Draw Enemy1.
Draws the first 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 Enemy1.cpp.
| Vector2D get_pos | ( | ) |
Get Enemy1 Position.
Obtains the position (x and y coordinates) of the first enemy ship at any given time, into a two-dimensional vector.
- Returns:
- p - the Vector2D of the parameters
Definition at line 48 of file Enemy1.cpp.
| void init | ( | int | speed ) |
Initialize Enemy1.
Initializes first enemy ship x (random) & y (fixed) positions, as well as speed.
Definition at line 14 of file Enemy1.cpp.
| void update | ( | ) |
Update Enemy1.
Updates the first enemy ship's x and y position. X and y positions are altered by adding speeds.
Definition at line 38 of file Enemy1.cpp.
Generated on Wed Jul 20 2022 17:20:31 by
1.7.2