JianWei Lee
/
project_game
Meteor defense project
Diff: Spawn/Spawn.h
- Revision:
- 45:1a013017ae92
- Parent:
- 40:3a0c66a0e10e
- Child:
- 46:abb046536524
diff -r aa086363d09f -r 1a013017ae92 Spawn/Spawn.h --- a/Spawn/Spawn.h Wed May 03 21:00:43 2017 +0000 +++ b/Spawn/Spawn.h Wed May 03 23:41:41 2017 +0000 @@ -16,6 +16,11 @@ int spawnRate; }; +/** Spawn Class +@brief Library that contain all the enemy in the game +@author JianWei Lee +@date April 2017 +*/ class Spawn { public: @@ -24,16 +29,16 @@ /**Initialise Spawn * - *The health and spawn rate of the spawn depends on the number of level - *Randomise the seed to make the spawning pattern different for every level + *@brief The health and spawn rate of the spawn depends on the number of level + *@brief Randomise the seed to make the spawning pattern different for every level *@param w - the number of level */ void init(int w); /**Summon Spawn * - *Spawn A and C takes turn to be summoned to prevent collision (summon spawn A this row and spawn C the next row) - *Spawn B and DE will be summoned randomly depends solely on the spawn rate + *@brief Spawn A and C takes turn to be summoned to prevent collision (summon spawn A this row and spawn C the next row) + *@brief Spawn B and DE will be summoned randomly depends solely on the spawn rate *@param Arr[][Rows] - int Array to store spawn health *@param cArr2[][Rows] - char Array to store the spawn character */ @@ -41,7 +46,7 @@ /** Movement of Spawn A, B and C * - *Moving behavior of spawn A, B and C is just moving down a row + *@brief Moving behavior of spawn A, B and C is just moving down a row *@param Arr[][Rows] - the int Array in sync with the char Array to be scanned *@param Arr2[][Rows] - int Array to be updated *@param cArr[][Rows] - char Array to be scanned @@ -51,7 +56,7 @@ /**Movement of Spawn B * - *Move spawn B down a row + *@brief Move spawn B down a row *@param Arr[][Rows] - the int Array in sync with the char Array to be scanned *@param Arr2[][Rows] - int Array to be updated *@param cArr[][Rows] - char Array to be scanned @@ -61,11 +66,11 @@ /**Movement of Spawn D&E * - *Spawn D & E moves diagonally - *Spawn D - move left & down - *Spawn E - move right & down - *It moves in the other direction when hit 'L' or 'R' of spawnC and walls. - *It jumps over Spawn A and Spawn B + *@brief Spawn D & E moves diagonally + *@brief Spawn D - move left & down + *@brief Spawn E - move right & down + *@brief It moves in the other direction when hit 'L' or 'R' of spawnC and walls. + *@brief It jumps over Spawn A and Spawn B *@param Arr[][Rows] - the int Array in sync with the char Array to be scanned *@param Arr2[][Rows] - int Array to be updated *@param cArr[][Rows] - char Array to be scanned @@ -75,9 +80,8 @@ /**Update spawn * - *This function to update spawn from secondary array to main array after taking damage & after moving spawn - * - *It also displays the spawn on LCD + *@brief This function to update spawn from secondary array to main array after taking damage & after moving spawn + *@brief It also prints the spawn on LCD *@param Arr[][Rows] - int Array to be updated *@param Arr2[][Rows] - the int Array in sync with the char Array to be scanned *@param cArr[][Rows] - char Array to be updated @@ -87,7 +91,7 @@ /*Delete spawn * - *Spawn that has 0 health will be deleted (cleaning tool) + *@brief Spawn that has 0 health will be deleted (cleaning tool) *http://stackoverflow.com/questions/10289197/how-to-empty-a-2d-char-array-in-c *@param x - the x co-ordinate of the spawn (0 to 83) *@param y - the y co-ordinate of the spawn (0 to 47)