Li Ruofan 201199450

Dependencies:   mbed Gamepad Joystick

UFO/UFO.h

Committer:
DannyLee
Date:
2020-05-16
Revision:
8:b4a2954dd74f
Parent:
6:cbd9e1f26a10

File content as of revision 8:b4a2954dd74f:

#ifndef UFO_H
#define UFO_H

#include "mbed.h"
#include "N5110.h"
#include "Joystick.h"
#include "Bitmap.h"
/* UFO Class
@Library for UFO object in the spaceship project
@coded by Li Ruofan
@May 2020
*/
class UFO{

public:
    /* Constructor & Destructor */
    UFO();
    
    ~UFO();
     
    /* Initiate the position and the size of the UFO
      @param the value of horizontal position x (int)
      @param the value of vertical position y (int)
      @param the columns of UFO image (int)
      @param the rows of UFO image (int) 
     */
    void init(int _sizeX,int _sizeY);
    
    /* Get the position of UFO in lcd
      @return the position of UFO in lcd
     */
    Vector2D getPos();
    
    /* Update the position of UFO
     */
    void update();
    
    /* draw the image of the UFO
     * @param lcd (N5110)
     * @param the value difficulty mode (int)
     */
    void draw(N5110 &lcd);
    
    /** Set the UFO speed
     * @param the value of UFO speed
     */        
    void setSpeed(int speed);
    
    /** Get the speed of the UFO
     * @return the value of speed of the UFO (int)
     */
    int getSpeed();
    
    /** Get the blood of the UFO
     * @return the blood of the UFO
     */
    int getBlood();
    
    /** Set the blood of the UFO
     * @param the blood of the UFO
     */
    void setBlood(int harm);
    
private:
    int _x;
    int _y;
    int _sizeX;
    int _sizeY;
    int _speed;
    int _blood;
    
};
#endif