Advertisement
Mr-A

A-Engine <ai.h> v0.07

Aug 5th, 2014
321
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.88 KB | None | 0 0
  1. //==========AI.h===========
  2. #ifndef AI_INCLUDED
  3. #define AI_INCLUDED
  4.  
  5. //=================================
  6. // included dependencies
  7. #include "Object.h"
  8. #include <string>
  9. //=================================
  10.  
  11.  
  12.  
  13. class AI_Stuff
  14. {
  15. private:
  16.     int _rate_count=0;
  17.     std::string _key_buffer[6]= {"", "", "", "", "", ""};
  18.     void holdKey(int keyindex);
  19.     void tapKey(int keyindex, float rate);
  20.     void releaseKey(int keyindex);
  21.     void updateControls(objcopy * objcop);
  22.     void pushKey(int keyid);
  23.     void clearKeyBuffer();
  24. public:
  25.     int _current_target=4321;
  26.     /*
  27.     0: Up; 1: Down; 2: Left; 3: Right;
  28.     4: Attack; 5: Defend; 6: Jump; 7: Special;
  29.     */
  30.     bool _keys[8]= {false, false, false, false, false, false, false, false};
  31.  
  32.     void setTarget(objcopy * objcop, LOAD * LOADED);
  33.     void playAI(objcopy * objcop, LOAD * LOADED);
  34.  
  35. };
  36. #endif // AI_INCLUDED
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement