- Timestamp:
- Dec 11, 2006, 8:30:22 PM (18 years ago)
- Location:
- branches/ai/src
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/ai/src/ai/ai_engine.cc
r10029 r10040 15 15 co-programmer: 16 16 */ 17 #define DEBUG_SPECIAL_MODULE DEBUG_MODULE_ WORLD_ENTITY17 #define DEBUG_SPECIAL_MODULE DEBUG_MODULE_AI 18 18 19 19 #include "ai_engine.h" 20 #include "debug.h" 21 22 AIEngine* AIEngine::singletonRef = NULL; 20 23 21 24 … … 25 28 AIEngine::~AIEngine() 26 29 {} 30 31 32 void AIEngine::process() 33 { 34 PRINTF(0)("Processing AI..\n"); 35 } -
branches/ai/src/ai/ai_engine.h
r10029 r10040 9 9 class AIEngine{ 10 10 public: 11 AIEngine();12 11 ~AIEngine(); 12 13 static AIEngine* getInstance() { if( singletonRef == NULL) singletonRef = new AIEngine(); return singletonRef; } 14 15 void process(); 16 private: 17 AIEngine(); 18 13 19 private: 14 20 std::vector<AITeam*> teams; 21 22 static AIEngine* singletonRef; 23 15 24 }; 16 25 -
branches/ai/src/lib/util/debug.h
r9869 r10040 82 82 #define DEBUG_MODULE_GUI 2 83 83 #define DEBUG_MODULE_SOUND 2 84 #define DEBUG_MODULE_AI 2 84 85 85 86 // MISC -
branches/ai/src/story_entities/game_world.cc
r9869 r10040 54 54 #include "ogg_player.h" 55 55 #include "shader.h" 56 #include "ai_engine.h" 56 57 57 58 #include "animation_player.h" … … 325 326 /* collision reaction */ 326 327 this->collisionReaction (); 328 329 /* perform ai check*/ 330 this->checkAI(); 327 331 328 332 /* check the game rules */ … … 498 502 499 503 504 505 void GameWorld::checkAI() 506 { 507 AIEngine::getInstance()->process(); 508 } 509 510 500 511 /** 501 512 * check the game rules: winning conditions, etc. -
branches/ai/src/story_entities/game_world.h
r9869 r10040 73 73 virtual void tick(); 74 74 virtual void update(); 75 virtual void checkAI(); 75 76 virtual void checkGameRules(); 76 77 virtual void collisionDetection();
Note: See TracChangeset
for help on using the changeset viewer.