Reham Faqehi / Mbed 2 deprecated fy15raf

Dependencies:   mbed

Fork of fy15raf by ELEC2645 (2017/18)

Asteroids/Asteroid.h

Committer:
RehamFaqehi
Date:
2018-05-07
Revision:
15:658f1216ee84
Parent:
8:13cef7cb872e
Child:
16:106c27d03402

File content as of revision 15:658f1216ee84:

#ifndef stone_H
#define stone_H

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

/** Asteroid Class
* @brief class create the Asteroids 
* @author Reham Faqehi  
* @date May, 2018  */


class Asteroid
{

public:

    /** Constructor */ 
    Asteroid();
    
    /** Destructor */
    ~Asteroid();
    
    /** Initialise the Asteroid position,
    * speed and size.           
    */   
    void init(float speed);
    
    /** Draw sprite for the Asteroid shape 
    * @param LCD object (N5110)     
    */ 
    void draw(N5110 &lcd);  
    
    /** Update the Asteroid position           
    */
    void update();
    
    /** Get the Asteroid position
    * @return the current position
    */ 
    Vector2D get_pos();

private:

    Vector2D _velocity;
    Vector2D p;
    int _size;
    int _x;
    int _y1;
};
#endif