FINAL VERSION
Life_Powerup Class Reference
Life_Powerup Class. More...
#include <Life_Powerup.h>
Public Member Functions | |
Life_Powerup () | |
Constructor declaration. | |
~Life_Powerup () | |
Destructor declaration. | |
void | init () |
Initialises the powerup off screen with a set velocity. | |
void | draw (N5110 &lcd) |
Draws the powerup at at its current coordinates on the LCD. | |
void | update () |
Update the powerup's y coordinate based on its velocity. | |
void | set_posx (int x) |
Sets the powerups's x coordinate. | |
void | set_posy (int y) |
Sets the powerups's x coordinate. | |
int | get_x () |
Retrieve the powerup's current x coordinate. | |
int | get_y () |
Retrieve the powerup's current y coordinate. |
Detailed Description
Life_Powerup Class.
- Date:
- May 2019
Definition at line 29 of file Life_Powerup.h.
Constructor & Destructor Documentation
Life_Powerup | ( | ) |
Constructor declaration.
Definition at line 3 of file Life_Powerup.cpp.
~Life_Powerup | ( | ) |
Destructor declaration.
Definition at line 8 of file Life_Powerup.cpp.
Member Function Documentation
void draw | ( | N5110 & | lcd ) |
Draws the powerup at at its current coordinates on the LCD.
- Parameters:
-
lcd a N5110 pointer
Definition at line 21 of file Life_Powerup.cpp.
int get_x | ( | ) |
Retrieve the powerup's current x coordinate.
- Returns:
- variable _x as an integer
Definition at line 36 of file Life_Powerup.cpp.
int get_y | ( | ) |
Retrieve the powerup's current y coordinate.
- Returns:
- variable _y as an integer
Definition at line 42 of file Life_Powerup.cpp.
void init | ( | ) |
Initialises the powerup off screen with a set velocity.
Definition at line 13 of file Life_Powerup.cpp.
void set_posx | ( | int | x ) |
Sets the powerups's x coordinate.
- Parameters:
-
x set the variable _x to the new local x
Definition at line 48 of file Life_Powerup.cpp.
void set_posy | ( | int | y ) |
Sets the powerups's x coordinate.
- Parameters:
-
y set the variable _y to the new local y
Definition at line 54 of file Life_Powerup.cpp.
void update | ( | ) |
Update the powerup's y coordinate based on its velocity.
Definition at line 30 of file Life_Powerup.cpp.
Generated on Thu Jul 14 2022 01:22:29 by 1.7.2