The game is finished
Dependencies: mbed Gamepad N5110 mbed-rtos
Enemy/EnemyBoss.h@14:c7302ffe6eab, 2019-05-09 (annotated)
- Committer:
- RexRoshan
- Date:
- Thu May 09 14:23:35 2019 +0000
- Revision:
- 14:c7302ffe6eab
- Parent:
- 13:a2f061b9cc36
Final Modification
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
RexRoshan | 1:45493d1d0689 | 1 | #ifndef ENEMYBOSS_H |
RexRoshan | 1:45493d1d0689 | 2 | #define ENEMYBOSS_H |
RexRoshan | 1:45493d1d0689 | 3 | |
RexRoshan | 1:45493d1d0689 | 4 | #include "mbed.h" |
RexRoshan | 1:45493d1d0689 | 5 | #include "N5110.h" |
RexRoshan | 1:45493d1d0689 | 6 | #include "Gamepad.h" |
RexRoshan | 1:45493d1d0689 | 7 | #include "Enemy.h" |
RexRoshan | 1:45493d1d0689 | 8 | |
RexRoshan | 6:1fcfd331c047 | 9 | /** EnemyBoss Class |
RexRoshan | 6:1fcfd331c047 | 10 | * @brief Enemies for stage three |
RexRoshan | 6:1fcfd331c047 | 11 | * @author Rex Roshan Raj |
RexRoshan | 6:1fcfd331c047 | 12 | */ |
RexRoshan | 1:45493d1d0689 | 13 | class EnemyBoss |
RexRoshan | 1:45493d1d0689 | 14 | { |
RexRoshan | 1:45493d1d0689 | 15 | |
RexRoshan | 1:45493d1d0689 | 16 | public: |
RexRoshan | 6:1fcfd331c047 | 17 | |
RexRoshan | 6:1fcfd331c047 | 18 | /** Constructor */ |
RexRoshan | 1:45493d1d0689 | 19 | EnemyBoss(); |
RexRoshan | 6:1fcfd331c047 | 20 | |
RexRoshan | 6:1fcfd331c047 | 21 | /** Destructor */ |
RexRoshan | 1:45493d1d0689 | 22 | ~EnemyBoss(); |
RexRoshan | 1:45493d1d0689 | 23 | |
RexRoshan | 6:1fcfd331c047 | 24 | /** Initialise the parameters for the enemies in stage three |
RexRoshan | 6:1fcfd331c047 | 25 | *@param a - x position of the boss |
RexRoshan | 6:1fcfd331c047 | 26 | *@param b - y position of the boss |
RexRoshan | 6:1fcfd331c047 | 27 | *@param c - x position of the first enemy |
RexRoshan | 6:1fcfd331c047 | 28 | *@param d - y position of the first enemy |
RexRoshan | 6:1fcfd331c047 | 29 | *@param e - x position of the second enemy |
RexRoshan | 6:1fcfd331c047 | 30 | *@param f - y position of the second enemy |
RexRoshan | 6:1fcfd331c047 | 31 | *@param speed - the speed of the boss moving |
RexRoshan | 6:1fcfd331c047 | 32 | */ |
RexRoshan | 1:45493d1d0689 | 33 | void init(int a,int b,int c,int d,int e,int f, int speed); |
RexRoshan | 6:1fcfd331c047 | 34 | |
RexRoshan | 6:1fcfd331c047 | 35 | /** Draws enemy |
RexRoshan | 6:1fcfd331c047 | 36 | * @param N5110 lcd |
RexRoshan | 6:1fcfd331c047 | 37 | * @brief Draws all three enemies in stage three |
RexRoshan | 6:1fcfd331c047 | 38 | */ |
RexRoshan | 1:45493d1d0689 | 39 | void enemyboss(N5110 &lcd); |
RexRoshan | 6:1fcfd331c047 | 40 | |
RexRoshan | 6:1fcfd331c047 | 41 | /** Updates the movement |
RexRoshan | 6:1fcfd331c047 | 42 | * @brief Changes the movement of the enemy |
RexRoshan | 6:1fcfd331c047 | 43 | */ |
RexRoshan | 1:45493d1d0689 | 44 | void update(); |
RexRoshan | 6:1fcfd331c047 | 45 | |
RexRoshan | 6:1fcfd331c047 | 46 | /** Adds the value of health by 1 |
RexRoshan | 6:1fcfd331c047 | 47 | *@brief Health for the boss |
RexRoshan | 6:1fcfd331c047 | 48 | */ |
RexRoshan | 1:45493d1d0689 | 49 | void add_health_boss(); |
RexRoshan | 6:1fcfd331c047 | 50 | |
RexRoshan | 6:1fcfd331c047 | 51 | /** Adds the value of health by 1 |
RexRoshan | 6:1fcfd331c047 | 52 | *@brief Health for the first enemy |
RexRoshan | 6:1fcfd331c047 | 53 | */ |
RexRoshan | 1:45493d1d0689 | 54 | void add_health_enemy1(); |
RexRoshan | 6:1fcfd331c047 | 55 | |
RexRoshan | 6:1fcfd331c047 | 56 | /** Adds the value of health by 1 |
RexRoshan | 6:1fcfd331c047 | 57 | *@brief Health for the second enemy |
RexRoshan | 6:1fcfd331c047 | 58 | */ |
RexRoshan | 1:45493d1d0689 | 59 | void add_health_enemy2(); |
RexRoshan | 6:1fcfd331c047 | 60 | |
RexRoshan | 6:1fcfd331c047 | 61 | /** Gets the value of the health |
RexRoshan | 6:1fcfd331c047 | 62 | * @brief returns the health of the boss |
RexRoshan | 6:1fcfd331c047 | 63 | * @returns value in range 0 to 10 |
RexRoshan | 6:1fcfd331c047 | 64 | */ |
RexRoshan | 1:45493d1d0689 | 65 | int get_health_boss(); |
RexRoshan | 6:1fcfd331c047 | 66 | |
RexRoshan | 6:1fcfd331c047 | 67 | /** Gets the value of the health |
RexRoshan | 6:1fcfd331c047 | 68 | * @brief returns the health of the first enemy |
RexRoshan | 6:1fcfd331c047 | 69 | * @returns value in range 0 to 10 |
RexRoshan | 6:1fcfd331c047 | 70 | */ |
RexRoshan | 1:45493d1d0689 | 71 | int get_health_enemy1(); |
RexRoshan | 6:1fcfd331c047 | 72 | |
RexRoshan | 6:1fcfd331c047 | 73 | /** Gets the value of the health |
RexRoshan | 6:1fcfd331c047 | 74 | * @brief returns the health of the second enemy |
RexRoshan | 6:1fcfd331c047 | 75 | * @returns value in range 0 to 10 |
RexRoshan | 6:1fcfd331c047 | 76 | */ |
RexRoshan | 1:45493d1d0689 | 77 | int get_health_enemy2(); |
RexRoshan | 6:1fcfd331c047 | 78 | |
RexRoshan | 6:1fcfd331c047 | 79 | /** Sets the movement of the enemy |
RexRoshan | 6:1fcfd331c047 | 80 | * @param movement |
RexRoshan | 6:1fcfd331c047 | 81 | */ |
RexRoshan | 1:45493d1d0689 | 82 | void set_movement(Vector2D m); |
RexRoshan | 6:1fcfd331c047 | 83 | |
RexRoshan | 6:1fcfd331c047 | 84 | /** Sets the position of the enemy |
RexRoshan | 6:1fcfd331c047 | 85 | * @brief Position of the boss |
RexRoshan | 6:1fcfd331c047 | 86 | * @param position |
RexRoshan | 6:1fcfd331c047 | 87 | */ |
RexRoshan | 1:45493d1d0689 | 88 | void set_enemyboss_pos(Vector2D e); |
RexRoshan | 6:1fcfd331c047 | 89 | |
RexRoshan | 6:1fcfd331c047 | 90 | /** Sets the position of the enemy |
RexRoshan | 6:1fcfd331c047 | 91 | * @brief Position of the first enemy |
RexRoshan | 6:1fcfd331c047 | 92 | * @param position |
RexRoshan | 6:1fcfd331c047 | 93 | */ |
RexRoshan | 1:45493d1d0689 | 94 | void set_enemy1_pos(Vector2D d); |
RexRoshan | 6:1fcfd331c047 | 95 | |
RexRoshan | 6:1fcfd331c047 | 96 | /** Sets the position of the enemy |
RexRoshan | 6:1fcfd331c047 | 97 | * @brief Position of the second enemy |
RexRoshan | 6:1fcfd331c047 | 98 | * @param position |
RexRoshan | 6:1fcfd331c047 | 99 | */ |
RexRoshan | 1:45493d1d0689 | 100 | void set_enemy2_pos(Vector2D c); |
RexRoshan | 6:1fcfd331c047 | 101 | |
RexRoshan | 6:1fcfd331c047 | 102 | /** Gets the motion of the boss |
RexRoshan | 6:1fcfd331c047 | 103 | * @returns a struct with x,y members which corresponds to velocity in the x and y direction respectively |
RexRoshan | 6:1fcfd331c047 | 104 | */ |
RexRoshan | 6:1fcfd331c047 | 105 | Vector2D motion(); |
RexRoshan | 6:1fcfd331c047 | 106 | |
RexRoshan | 6:1fcfd331c047 | 107 | /** Gets the position of the enemy |
RexRoshan | 6:1fcfd331c047 | 108 | * @brief Position of the boss |
RexRoshan | 6:1fcfd331c047 | 109 | * @returns a struct with x,y members which corresponds to x and y position respectively |
RexRoshan | 6:1fcfd331c047 | 110 | */ |
RexRoshan | 1:45493d1d0689 | 111 | Vector2D get_enemyboss_pos(); |
RexRoshan | 6:1fcfd331c047 | 112 | |
RexRoshan | 6:1fcfd331c047 | 113 | /** Gets the position of the enemy |
RexRoshan | 6:1fcfd331c047 | 114 | * @brief Position of the first enemy |
RexRoshan | 6:1fcfd331c047 | 115 | * @returns a struct with x,y members which corresponds to x and y position respectively |
RexRoshan | 6:1fcfd331c047 | 116 | */ |
RexRoshan | 1:45493d1d0689 | 117 | Vector2D get_enemy1_pos(); |
RexRoshan | 6:1fcfd331c047 | 118 | |
RexRoshan | 6:1fcfd331c047 | 119 | /** Gets the position of the enemy |
RexRoshan | 6:1fcfd331c047 | 120 | * @brief Position of the second enemy |
RexRoshan | 6:1fcfd331c047 | 121 | * @returns a struct with x,y members which corresponds to x and y position respectively |
RexRoshan | 6:1fcfd331c047 | 122 | */ |
RexRoshan | 1:45493d1d0689 | 123 | Vector2D get_enemy2_pos(); |
RexRoshan | 6:1fcfd331c047 | 124 | |
RexRoshan | 6:1fcfd331c047 | 125 | /** Gets the movement of the boss |
RexRoshan | 6:1fcfd331c047 | 126 | * @returns a struct with x,y members which corresponds to x and y movement respectively |
RexRoshan | 6:1fcfd331c047 | 127 | */ |
RexRoshan | 1:45493d1d0689 | 128 | Vector2D get_movement(); |
RexRoshan | 1:45493d1d0689 | 129 | |
RexRoshan | 1:45493d1d0689 | 130 | private: |
RexRoshan | 1:45493d1d0689 | 131 | |
RexRoshan | 1:45493d1d0689 | 132 | Vector2D _movement; |
RexRoshan | 13:a2f061b9cc36 | 133 | |
RexRoshan | 1:45493d1d0689 | 134 | int _a; |
RexRoshan | 1:45493d1d0689 | 135 | int _b; |
RexRoshan | 1:45493d1d0689 | 136 | int _c; |
RexRoshan | 1:45493d1d0689 | 137 | int _d; |
RexRoshan | 1:45493d1d0689 | 138 | int _e; |
RexRoshan | 1:45493d1d0689 | 139 | int _f; |
RexRoshan | 1:45493d1d0689 | 140 | int _direction; |
RexRoshan | 1:45493d1d0689 | 141 | int _speed; |
RexRoshan | 1:45493d1d0689 | 142 | int _health; |
RexRoshan | 1:45493d1d0689 | 143 | int _health1; |
RexRoshan | 1:45493d1d0689 | 144 | int _health2; |
RexRoshan | 1:45493d1d0689 | 145 | |
RexRoshan | 1:45493d1d0689 | 146 | }; |
RexRoshan | 1:45493d1d0689 | 147 | |
RexRoshan | 1:45493d1d0689 | 148 | #endif |