truelight@9361: /* $Id$ */ truelight@9361: truelight@9388: /** @file ai_controler.hpp declaration of class for AIController class */ truelight@9361: truelight@9361: #ifndef AI_CONTROLLER_HPP truelight@9361: #define AI_CONTROLLER_HPP truelight@9361: truelight@9361: #include "../../stdafx.h" truelight@9361: truelight@9361: class AIController { truelight@9372: private: truelight@9361: uint tick; truelight@9361: truelight@9372: public: truelight@9361: AIController() : truelight@9361: tick(0) truelight@9361: {} truelight@9361: truelight@9361: virtual ~AIController() { } truelight@9361: truelight@9361: /** truelight@9361: * This function is called every tick. truelight@9361: */ truelight@9361: virtual void GameLoop() = 0; truelight@9361: truelight@9361: /** truelight@9361: * Increase the internal ticker. truelight@9361: */ truelight@9361: void IncreaseTick() { this->tick++; } truelight@9372: truelight@9372: /** truelight@9372: * Return the value of the ticker. truelight@9372: */ truelight@9372: uint GetTick() { return this->tick; } truelight@9361: }; truelight@9361: truelight@9361: #endif /* AI_CONTROLLER_HPP */ truelight@9404: truelight@9425: #ifdef DEFINE_SQUIRREL_CLASS truelight@9422: void SQAIControllerRegister(Squirrel *engine) { truelight@9404: DefSQClass SQAIController("AIController"); truelight@9404: SQAIController.PreRegister(engine); truelight@9404: SQAIController.DefSQFunction(engine, &AIControllerSquirrel::GetTick, "GetTick"); truelight@9404: SQAIController.PostRegister(engine); truelight@9404: } truelight@9404: #endif /* SQUIRREL_CLASS */