zhenye yang
/
el17zy
Yang Zhenye 201199680
Diff: Ball/Ball.h
- Revision:
- 1:74f525027af6
- Child:
- 5:fcad75e9b9e1
diff -r ac2868313b41 -r 74f525027af6 Ball/Ball.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Ball/Ball.h Tue Apr 28 10:21:42 2020 +0000 @@ -0,0 +1,29 @@ +#ifndef BALL_H +#define BALL_H + +#include "mbed.h" +#include "N5110.h" +#include "Gamepad.h" + +class Ball +{ + +public: + Ball(); + ~Ball(); + void init(int size,int speed); + void draw(N5110 &lcd); + void update(); + void set_velocity(Vector2D v); + Vector2D get_velocity(); + Vector2D get_pos(); + void set_pos(Vector2D p); + +private: + + Vector2D _velocity; + int _size; + int _x; + int _y; +}; +#endif \ No newline at end of file