Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed
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
Generated on Tue Jul 12 2022 18:57:15 by
1.7.2