Last change
on this file since 10158 was
10158,
checked in by tfahrni, 17 years ago
|
tried some new ideas for swarming and fixed a bug in Vector.h
|
File size:
655 bytes
|
Line | |
---|
1 | |
---|
2 | #ifndef _AI_SWARM_H |
---|
3 | #define _AI_SWARM_H |
---|
4 | |
---|
5 | #include "world_entity.h" |
---|
6 | #include "ai_module.h" |
---|
7 | |
---|
8 | class AISwarm{ |
---|
9 | public: |
---|
10 | AISwarm(){} |
---|
11 | ~AISwarm(){} |
---|
12 | void process(float dt); |
---|
13 | void addAI(AIModule* newMember); |
---|
14 | void removeAI(AIModule* oldMember); |
---|
15 | inline int getSwarmSize(){return swarmMembers.size();} |
---|
16 | inline void setEnemyList(std::vector<WorldEntity*>* enemyList){this->enemyList=enemyList;} |
---|
17 | inline void setDestination(Vector destination){this->destination=destination;} |
---|
18 | Vector getPosition(); |
---|
19 | private: |
---|
20 | Vector destination; |
---|
21 | Vector movement; |
---|
22 | std::vector<WorldEntity*>* enemyList; |
---|
23 | std::set<AIModule*> swarmMembers; |
---|
24 | }; |
---|
25 | |
---|
26 | #endif /* _AI_SWARM_H */ |
---|
Note: See
TracBrowser
for help on using the repository browser.