Changeset 10513 in orxonox.OLD for trunk/src/ai
- Timestamp:
- Jan 30, 2007, 8:12:15 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/ai/ai_engine.h
r10376 r10513 7 7 8 8 9 class AIEngine{ 10 public: 11 ~AIEngine(){} 9 class AIEngine 10 { 11 public: 12 ~AIEngine() { singletonRef = NULL; } 12 13 13 14 static AIEngine* getInstance() { if( singletonRef == NULL) singletonRef = new AIEngine(); return singletonRef; } 14 15 15 16 17 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); 18 19 19 private: 20 AIEngine(){} 21 static AIEngine* singletonRef; 22 std::map<int,AITeam*> teams; 20 private: 21 AIEngine() 22 {} 23 static AIEngine* singletonRef; 24 std::map<int,AITeam*> teams; 23 25 }; 24 26
Note: See TracChangeset
for help on using the changeset viewer.