| Line |   | 
|---|
| 1 |  | 
|---|
| 2 | #ifndef _AI_ENGINE_H | 
|---|
| 3 | #define _AI_ENGINE_H | 
|---|
| 4 |  | 
|---|
| 5 |  | 
|---|
| 6 | #include "ai_team.h" | 
|---|
| 7 |  | 
|---|
| 8 |  | 
|---|
| 9 | class AIEngine | 
|---|
| 10 | { | 
|---|
| 11 | public: | 
|---|
| 12 |   ~AIEngine() { singletonRef = NULL; } | 
|---|
| 13 |  | 
|---|
| 14 |   static AIEngine* getInstance() { if( singletonRef == NULL) singletonRef = new AIEngine(); return singletonRef; } | 
|---|
| 15 |  | 
|---|
| 16 |   void tick(float dt); | 
|---|
| 17 |   void addAI(int teamNumber, int swarmNumber, WorldEntity* npc, float maxSpeed, float attackDistance); | 
|---|
| 18 |   void removeAI(int teamNumber, int swarmNumber, WorldEntity* npc); | 
|---|
| 19 |  | 
|---|
| 20 | private: | 
|---|
| 21 |   AIEngine() | 
|---|
| 22 | {} | 
|---|
| 23 |   static AIEngine* singletonRef; | 
|---|
| 24 |   std::map<int,AITeam*> teams; | 
|---|
| 25 | }; | 
|---|
| 26 |  | 
|---|
| 27 | #endif /* _AI_ENGINE_H */ | 
|---|
       
      
      Note: See 
TracBrowser
        for help on using the repository browser.