not final

Dependencies:   mbed

Bullet/Bullet.h

Committer:
ChenZirui
Date:
2020-05-29
Revision:
14:3b4370d5b2c0
Parent:
11:1eb7f53bd2ec

File content as of revision 14:3b4370d5b2c0:

#ifndef Bullet_H
#define Bullet_H

#include "mbed.h"
#include "N5110.h"
#include "Gamepad.h"
#include "Board.h"

/** Bullet Class
@author Chen Zirui, University of Leeds
@brief Bullet data and its functions list,initialisation,drawing,updating,positing setting and speed reading
@date May 2020
*/ 
class Bullet
{

public:
    /**inialisation */
    void init(int x,int size,int speed,int height);              //initial datas of bullet
    /**draw a bullet*/                                                   
    void draw(N5110 &lcd);     
    /**update data*/                                   
    void update(N5110 &lcd);                                     //update bullet position
    /** set velocity    */                           
    void set_velocity(Vector2D v);
    /**speed data reading */                              
    Vector2D get_velocity();   
    /**position reading */                                  
    Vector2D get_pos();
    /**position setting */                                        
    void set_pos(Vector2D p);                                    
    
private:
    // all parameters about bullet
    Vector2D _velocity;
    int _size;
    int _x;
    int _y;
    float X;
    float Y;
   
};
#endif