ELEC2645 (2018/19) / Mbed 2 deprecated el17aj

Dependencies:   mbed

Revision:
3:97cd7b3d89d0
Parent:
2:88019d96e1da
Child:
5:8bd09c675f28
--- a/Enemy/Enemy.h	Wed Apr 24 12:38:53 2019 +0000
+++ b/Enemy/Enemy.h	Sun Apr 28 16:55:24 2019 +0000
@@ -29,7 +29,7 @@
     
 
     Action enemAction;
-    void init(float timeToAttack);
+    void init(float timeToAttack, float speed);
     void draw(N5110 &lcd);
     void update(int fps);
     /// accessors and mutators
@@ -42,6 +42,7 @@
     
      
     void set_current_action(Action act);
+    Action get_current_action();
     
     void set_alive(bool alive);
     bool get_alive();
@@ -51,12 +52,13 @@
     
 private:
 
-    int _x;
-    int _y;
+    float _x;
+    float _y;
     
     bool _attack;
     bool _alive;
     float _timeToAttack;
+    float _speed;
         
     float _animationTick; 
     Action currentAction;