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: Enemy/Enemy.h
- Revision:
- 1:3916f272663e
- Child:
- 2:88019d96e1da
diff -r d0cb7ea80e0c -r 3916f272663e Enemy/Enemy.h
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/Enemy/Enemy.h Sun Apr 21 19:02:21 2019 +0000
@@ -0,0 +1,40 @@
+#ifndef ENEMY_H
+#define ENEMY_H
+
+#include "mbed.h"
+#include "N5110.h"
+#include "Gamepad.h"
+#include <time.h>
+
+
+/** CrossHairs Class
+@author Adam Jones, University of Leeds
+@brief Controls the Enemy Sprites in the Wall Defence game
+@date April 2017
+*/
+class Enemy
+{
+
+public:
+ Enemy();
+ ~Enemy();
+ void init(float timeToAttack);
+ void draw(N5110 &lcd);
+ void update();
+ /// accessors and mutators
+ Vector2D get_pos();
+ void set_pos(Vector2D p);
+ void set_attack(bool attack);
+ float get_timeToAttack();
+
+ void set_alive(bool alive);
+ bool get_alive();
+private:
+
+ int _x;
+ int _y;
+ bool _attack;
+ bool _alive;
+ float _timeToAttack;
+};
+#endif
\ No newline at end of file