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
Diff: People/People.h
- Revision:
- 2:67b51ee7fc34
- Child:
- 3:b8fbaefc496c
diff -r b133934e0d45 -r 67b51ee7fc34 People/People.h
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/People/People.h Sun Apr 12 04:35:32 2020 +0000
@@ -0,0 +1,42 @@
+/** People class
+ @set a basic element of my project
+ @author Zeyu Feng
+ @date April 2020
+ */
+#ifndef PEOPLE_H
+#define PEOPLE_H
+
+#include "mbed.h"
+#include "Gamepad.h"
+#include "N5110.h"
+
+class People {
+
+public:
+ People(); //Constructor
+
+ ~People(); //Destructor
+
+ void init();
+
+ void draw(N5110 &lcd);
+
+ void update();
+
+ //accessors
+ void set_pos(Vector2D p);
+
+ void set_velocity(Vector2D v);
+
+ //mutators
+ Vector2D get_pos();
+
+ Vector2D get_velocity();
+
+private:
+ Vector2D _velocity;
+ int _x;
+ int _y;
+};
+#endif
+
\ No newline at end of file