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/Enemy1.h
- Revision:
- 11:953141c3f7dd
- Parent:
- 10:7ba63530dc04
- Child:
- 12:200a1266ceee
--- a/Enemy/Enemy1.h Mon Apr 29 22:08:22 2019 +0000
+++ b/Enemy/Enemy1.h Thu May 02 17:50:39 2019 +0000
@@ -0,0 +1,45 @@
+#ifndef ENEMY1_H
+#define ENEMY1_H
+
+#include "mbed.h"
+#include "N5110.h"
+#include "Gamepad.h"
+#include "mC.h"
+
+const int enemy_01[7][7] = {
+ {1,0,1,1,1,0,1},
+ {1,0,1,0,1,0,1},
+ {0,1,1,0,1,1,0},
+ {0,1,0,0,0,1,0},
+ {1,1,1,1,1,1,1},
+ {1,0,0,0,0,0,1},
+ {1,0,0,0,0,0,1}
+
+ };
+
+class Enemy1{
+
+public:
+
+ void init(int x,int y);
+ void drawSprite(N5110 &lcd);
+ void movement(N5110 &lcd);
+ int get_x_enem();
+ int get_y_enem();
+ bool northCollision(int x, int y, N5110 &lcd);
+ bool southCollision(int x, int y, N5110 &lcd);
+ bool eastCollision(int x, int y, N5110 &lcd);
+ bool westCollision(int x, int y, N5110 &lcd);
+ Enemy1();
+ ~Enemy1();
+
+private:
+
+ int x_enem;
+ int y_enem;
+ int accel;
+
+
+};
+
+#endif
\ No newline at end of file