The game is finished

Dependencies:   mbed Gamepad N5110 mbed-rtos

Committer:
RexRoshan
Date:
Thu May 09 14:23:35 2019 +0000
Revision:
14:c7302ffe6eab
Parent:
10:f44b43ed1a06
Final Modification

Who changed what in which revision?

UserRevisionLine numberNew contents of line
RexRoshan 7:574c66ebd8b0 1 #ifndef BACKGROUND_H
RexRoshan 7:574c66ebd8b0 2 #define BACKGROUND_H
RexRoshan 7:574c66ebd8b0 3
RexRoshan 7:574c66ebd8b0 4 #include "mbed.h"
RexRoshan 7:574c66ebd8b0 5 #include "N5110.h"
RexRoshan 7:574c66ebd8b0 6 #include "Gamepad.h"
RexRoshan 7:574c66ebd8b0 7
RexRoshan 7:574c66ebd8b0 8 /** Background Class
RexRoshan 7:574c66ebd8b0 9 * @brief Shows the background of the minigame
RexRoshan 7:574c66ebd8b0 10 * @author Rex Roshan Raj
RexRoshan 7:574c66ebd8b0 11 */
RexRoshan 7:574c66ebd8b0 12 class Background
RexRoshan 7:574c66ebd8b0 13 {
RexRoshan 7:574c66ebd8b0 14
RexRoshan 7:574c66ebd8b0 15 public:
RexRoshan 7:574c66ebd8b0 16 /** Constructor */
RexRoshan 7:574c66ebd8b0 17 Background();
RexRoshan 7:574c66ebd8b0 18
RexRoshan 7:574c66ebd8b0 19 /** Destructor */
RexRoshan 7:574c66ebd8b0 20 ~Background();
RexRoshan 7:574c66ebd8b0 21
RexRoshan 7:574c66ebd8b0 22 /** Initialise the parameters for background in minigame
RexRoshan 7:574c66ebd8b0 23 *@param a - x position of the upper cloud
RexRoshan 7:574c66ebd8b0 24 *@param b - y position of the upper cloud
RexRoshan 7:574c66ebd8b0 25 */
RexRoshan 7:574c66ebd8b0 26 void init_u(int a,int b);
RexRoshan 7:574c66ebd8b0 27
RexRoshan 7:574c66ebd8b0 28 /** Initialise the parameters for background in minigame
RexRoshan 7:574c66ebd8b0 29 *@param c - x position of the lower cloud
RexRoshan 7:574c66ebd8b0 30 *@param d - y position of the lower cloud
RexRoshan 7:574c66ebd8b0 31 */
RexRoshan 7:574c66ebd8b0 32 void init_l(int c, int d);
RexRoshan 7:574c66ebd8b0 33
RexRoshan 7:574c66ebd8b0 34 /** Draws the enemy
RexRoshan 7:574c66ebd8b0 35 * @param N5110 lcd
RexRoshan 7:574c66ebd8b0 36 * @brief Draws the enemy in stage one
RexRoshan 7:574c66ebd8b0 37 */
RexRoshan 7:574c66ebd8b0 38 void background(N5110 &lcd);
RexRoshan 7:574c66ebd8b0 39
RexRoshan 7:574c66ebd8b0 40 /** Updates the movement
RexRoshan 7:574c66ebd8b0 41 * @brief Changes the y position for animation once the enemy has died
RexRoshan 7:574c66ebd8b0 42 */
RexRoshan 7:574c66ebd8b0 43 void update();
RexRoshan 7:574c66ebd8b0 44
RexRoshan 7:574c66ebd8b0 45 /** Gets the position of the upper cloud
RexRoshan 7:574c66ebd8b0 46 * @returns a struct with x,y members which corresponds to x and y position respectively
RexRoshan 7:574c66ebd8b0 47 */
RexRoshan 7:574c66ebd8b0 48 Vector2D get_pos_upper();
RexRoshan 7:574c66ebd8b0 49
RexRoshan 7:574c66ebd8b0 50 /** Gets the position of the lower cloud
RexRoshan 7:574c66ebd8b0 51 * @returns a struct with x,y members which corresponds to x and y position respectively
RexRoshan 7:574c66ebd8b0 52 */
RexRoshan 7:574c66ebd8b0 53 Vector2D get_pos_lower();
RexRoshan 7:574c66ebd8b0 54
RexRoshan 7:574c66ebd8b0 55 /** Sets the position of the upper cloud
RexRoshan 7:574c66ebd8b0 56 * @param position of the upper cloud
RexRoshan 7:574c66ebd8b0 57 */
RexRoshan 7:574c66ebd8b0 58 void set_pos_upper(Vector2D e);
RexRoshan 7:574c66ebd8b0 59
RexRoshan 7:574c66ebd8b0 60 /** Sets the position of the lower cloud
RexRoshan 7:574c66ebd8b0 61 * @param position of the lower cloud
RexRoshan 7:574c66ebd8b0 62 */
RexRoshan 7:574c66ebd8b0 63 void set_pos_lower(Vector2D e);
RexRoshan 7:574c66ebd8b0 64
RexRoshan 7:574c66ebd8b0 65 private:
RexRoshan 7:574c66ebd8b0 66
RexRoshan 7:574c66ebd8b0 67 // methods
RexRoshan 7:574c66ebd8b0 68 int _a;
RexRoshan 7:574c66ebd8b0 69 int _b;
RexRoshan 7:574c66ebd8b0 70 int _c;
RexRoshan 7:574c66ebd8b0 71 int _d;
RexRoshan 7:574c66ebd8b0 72 int _fast;
RexRoshan 7:574c66ebd8b0 73
RexRoshan 7:574c66ebd8b0 74 };
RexRoshan 7:574c66ebd8b0 75
RexRoshan 7:574c66ebd8b0 76 #endif