zhenye yang / Mbed 2 deprecated el17zy

Dependencies:   mbed

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers Ball.h Source File

Ball.h

00001 #ifndef BALL_H
00002 #define BALL_H
00003 
00004 #include "mbed.h"
00005 #include "N5110.h"
00006 #include "Gamepad.h"
00007  
00008 class Ball
00009 {
00010 
00011 public:
00012     // Constructor and destructor.
00013     /**
00014     * @brief Constructor @details Non user specified.
00015     */
00016     Ball();
00017     /**
00018     * @brief Destructor @details Non user specified.
00019     */
00020     ~Ball();
00021     void init(int size,int speed);
00022     void draw(N5110 &lcd);
00023     void update();
00024     void set_velocity(Vector2D v);
00025     Vector2D get_velocity();
00026     Vector2D get_pos();
00027     void set_pos(Vector2D p);
00028     
00029 private:
00030 
00031     Vector2D _velocity;
00032     int _size;
00033     int _x;
00034     int _y;
00035 };
00036 #endif