Laila Al Badwawi 200906179 SpaceInvaders I declare this my own independent work and understand the university rules on plagiarism.
Dependencies: mbed
SpaceEngine Class Reference
bullet Class More...
#include <SpaceEngine.h>
Public Member Functions | |
void | init (int x_spaceship, int y_spaceship, int x_bullet, int y_bullet, int fired_bullet, int x_alien, int y_alien, int speed_alien, int speed_bullet, int speed_spaceship) |
initialise an identity for the spaceship,alien,bullet | |
void | read_input (Gamepad &pad) |
reading the positions of the objects | |
void | update (Gamepad &pad) |
updating the positions of the objects (Gamepad and pad) | |
void | draw (N5110 &lcd) |
drawing the objects in the lcd |
Detailed Description
bullet Class
SpaceEngine controlls the whole game
- Date:
- April 2019
Definition at line 19 of file SpaceEngine.h.
Member Function Documentation
void draw | ( | N5110 & | lcd ) |
drawing the objects in the lcd
this function draw the objects on the screen by using the (N5110 &lcd) libraries if statment to check if the alien is alive so the lcd can draw it on the screen else if statment will check if the alien dead so it should disappear also it draws the spaceship
- Parameters:
-
_(N5110 &lcd)
the libraries which drawing the objects of class SpaceEngine on the screen.
Definition at line 44 of file SpaceEngine.cpp.
void init | ( | int | x_spaceship, |
int | y_spaceship, | ||
int | x_bullet, | ||
int | y_bullet, | ||
int | fired_bullet, | ||
int | x_alien, | ||
int | y_alien, | ||
int | speed_alien, | ||
int | speed_bullet, | ||
int | speed_spaceship | ||
) |
initialise an identity for the spaceship,alien,bullet
- Parameters:
-
x_spaceship the x-cooridante of spaceship in intger y_spaceship the y-cooridante of spaceship in integer speed_spaceship the speed of spaceship in integer x_bullet the x-cooridante of bullet in intger y_bullet the y-cooridante of bullet in integer speed_bullet the speed of bullet in integer fired_bullet the bullet fired by the spaceship x_alien the x-cooridante of Alien in intger y_alien the y-cooridante of Alien in integer speed_alien the speed of Alien in integer
Definition at line 12 of file SpaceEngine.cpp.
void read_input | ( | Gamepad & | pad ) |
reading the positions of the objects
- Parameters:
-
_(Gamepad and pad)
the libraries which reading the the positions of the inputs(objects) in class SpaceEngine to detect the collisions.
Definition at line 32 of file SpaceEngine.cpp.
void update | ( | Gamepad & | pad ) |
updating the positions of the objects (Gamepad and pad)
the libraries which updating the the positions of the inputs(objects) in class SpaceEngine to detect the collisions.
Definition at line 66 of file SpaceEngine.cpp.
Generated on Sat Aug 6 2022 12:54:46 by 1.7.2