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