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 | public: |
---|
11 | ~AIEngine(){} |
---|
12 | |
---|
13 | static AIEngine* getInstance() { if( singletonRef == NULL) singletonRef = new AIEngine(); return singletonRef; } |
---|
14 | |
---|
15 | void tick(float dt); |
---|
16 | |
---|
17 | void addTeam(int teamNumber); |
---|
18 | void removeTeam(int teamNumber); |
---|
19 | AITeam* getTeam(int teamNumber); |
---|
20 | AITeam* getCreateTeam(int teamNumber); |
---|
21 | |
---|
22 | private: |
---|
23 | void rebuildAIVector(); |
---|
24 | |
---|
25 | std::vector<AIModule*> AIVector; |
---|
26 | |
---|
27 | static const int maxTeams=32; |
---|
28 | AITeam* teams[32]; |
---|
29 | AIEngine(); |
---|
30 | |
---|
31 | static AIEngine* singletonRef; |
---|
32 | }; |
---|
33 | |
---|
34 | #endif /* _AI_ENGINE_H */ |
---|
Note: See
TracBrowser
for help on using the repository browser.