ELEC2645 (2018/19) / Mbed 2 deprecated el17m2h_public

Dependencies:   mbed

Revision:
23:9be87557b89a
Parent:
20:a359092079b0
Child:
29:15e9640646b7
--- a/Enemy/Enemy.cpp	Mon May 06 11:21:39 2019 +0000
+++ b/Enemy/Enemy.cpp	Wed May 08 08:46:11 2019 +0000
@@ -11,7 +11,25 @@
 }
 
 void Enemy::draw(N5110 &lcd){
-    lcd.drawCircle(_position.x, _position.y, _radius, FILL_TRANSPARENT);
+    const int image [16][16] = {
+    {0,0,0,0,0,0,1,1,1,1,0,0,0,0,0,0},
+    {0,0,0,0,1,1,0,0,0,0,1,1,0,0,0,0},
+    {0,0,0,1,0,0,0,0,0,0,0,0,1,0,0,0},
+    {0,0,1,1,0,0,0,0,0,0,0,0,1,1,0,0},
+    {0,0,1,0,1,0,0,0,0,0,0,1,0,1,0,0},
+    {0,0,1,0,1,1,1,0,0,1,1,1,0,1,0,0},
+    {0,0,1,0,1,1,1,0,0,1,1,1,0,1,0,0},
+    {0,0,1,0,0,0,0,0,0,0,0,0,0,1,0,0},
+    {0,0,1,0,0,0,0,0,0,0,0,0,0,1,0,0},
+    {0,0,1,0,0,0,0,0,0,0,0,0,0,1,0,0},
+    {0,0,1,0,0,0,0,0,0,0,0,0,0,1,0,0},
+    {0,0,1,0,0,0,0,0,0,0,0,0,0,1,0,0},
+    {0,0,1,0,0,0,0,0,0,0,0,0,0,1,0,0},
+    {0,0,1,1,1,0,0,1,1,0,0,1,1,1,0,0},
+    {0,0,1,1,0,1,1,0,0,1,1,0,1,1,0,0},
+    {0,0,1,0,0,0,1,0,0,1,0,0,0,1,0,0},
+    };
+    lcd.drawSprite(_position.x, _position.y, 16, 16,(int*)image);
 }
 
 void Enemy::update(float floor_pos_x, float floor_pos_y){ // decides if it gets erased