ELEC2645 (2018/19) / Mbed 2 deprecated el17st

Dependencies:   mbed FATFileSystem

Revision:
9:ac396c818874
Parent:
6:6f84347e9e14
Child:
10:4fda7b01484a
--- a/CaMove/CaMove.h	Tue Apr 23 21:46:55 2019 +0000
+++ b/CaMove/CaMove.h	Thu Apr 25 01:31:32 2019 +0000
@@ -90,6 +90,7 @@
 #include "Bitmap.h"
 #include <vector>
 
+
 /** Enum For Charater's Facing Direction. */
 enum Direction {
         Lt, /**< Charater Facing Left. */
@@ -99,6 +100,7 @@
 };
 
 class CaMove {
+    friend class AI;
     public :
     /** Constructor
      *
@@ -155,6 +157,22 @@
      *
      */
     int get_treg();
+    /** Function that initilizes chasing Charater Models. */
+    void AIinit();
+    /** Function that spawns the chasing Charater.
+     *
+     *@param x The x-location where Charater will Spawn.
+     *@param y The y-location where Charater will Spawn.
+     */
+    void spawn(int x, int y);
+    /** Function that moves the Charater per Frame.
+     *@param lcd The N5110 class object.
+     */
+    void chase(N5110 &lcd);
+    /** Function that tell if the player is caught by chaser Charater.
+     *@returns Returns a boolean true is caught and false if not.
+     */
+    bool is_caught();
     
     private :
     //Hardware Pins
@@ -172,6 +190,11 @@
     //Volatile variables for ISR Interrupts
     volatile int _treg;
     volatile bool _trg;
+    void rend(N5110 &lcd);
+    //AI Componets
+    bool enabled;
+    int _ch;
+    int _cv;
 };
 
 #endif
\ No newline at end of file