Laila Al Badwawi 200906179 SpaceInvaders I declare this my own independent work and understand the university rules on plagiarism.
Dependencies: mbed
Diff: Spaceship/Spaceship.h
- Revision:
- 145:e060e890c725
- Parent:
- 144:0473845a4aaa
- Child:
- 149:bd0f37008f5a
--- a/Spaceship/Spaceship.h Thu May 09 08:26:27 2019 +0000 +++ b/Spaceship/Spaceship.h Thu May 09 09:27:32 2019 +0000 @@ -73,11 +73,11 @@ */ ~Spaceship(); /** - *@brief initialise an identity for the spaceship - *@param x_spaceship @details the x-cooridante of spaceship in intger - *@param y_spaceship @details the y-cooridante of spaceship in integer - *@param speed_spaceship @details the speed of spaceship in integer - */ + *@brief initialise an identity for the spaceship + *@param x_spaceship @details the x-cooridante of spaceship in intger + *@param y_spaceship @details the y-cooridante of spaceship in integer + *@param speed_spaceship @details the speed of spaceship in integer + */ void init(int x_spaceship,int y_spaceship, int speed_spaceship); @@ -92,7 +92,8 @@ *@param update @details update the position of the spaceship. */ void update(Direction d,float mag); - /**@brief setting up the position the of the spaceship + /** + *@brief setting up the position the of the spaceship *@param set_pos @details set the position the of the spaceship in x-cooridante and y-cooridante */ void set_pos(int x, int y); @@ -101,39 +102,61 @@ *@returns the position of the y-cooridante in integer which refer to the spaceship */ int get_pos_y(); + /** + *@brief Gets the postion of the x-cooridante + *@returns the position of the x-cooridante in integer which refer to the spaceship + */ int get_pos_x(); + /** + *@brief reading the position of the spaceship + *@param _(Gamepad and pad)@details the libraries which reading the position of the spaceship in class Spaceship to detect the collisions between it and the other objects. + */ void read_input(Gamepad &pad); + /** + *@brief adding scores of the spaceship + *@param _scores @details adding scores when spaceship fired the alien. + */ void add_score(); + /** + *@brief Gets the scores of the spaceship + *@returns the number of the scores of the spaceship in integer + */ int get_score(); private: - /* + /** *@param (_x_spaceship) a private variable of class Spaceship that represents the x-cooridante of the spaceship - */ + */ int _x_spaceship; - /* + /** *@param (_x_spaceship) a private variable of class spaceship that represents the x-cooridante of the spaceship */ int _y_spaceship; - /* + /** *@param (_speed_spaceship) declation of a variable private member which shows the speed of the spaceship. */ int _speed_spaceship; + /** + *@param (_spaceship2)a private variable of class Spaceship used for drawing the spaceship in sprite. + */ int _spaceship2; + /** + *@param (_score) a private variable of class Spaceship that represent the scores of the spaceship. + */ int _score; - /*@param - (_direcation) a private variable of class spaceship that represents of spaceship - */ + /** + *@param(_direcation) a private variable of class spaceship that represents of spaceship + */ Direction d; - /*@param - (_mag) float a private variable of class spaceship that represents magnitude of the spaceship - */ + /*@param + (_mag) float a private variable of class spaceship that represents magnitude of the spaceship + */ float mag; }; #endif \ No newline at end of file