/* * ORXONOX - the hottest 3D action shooter ever to exist * > www.orxonox.net < * * * License notice: * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * Author: * Paul Lehmann * Co-authors: * ... * */ #ifndef _NewScriptController_H__ #define _NewScriptController_H__ #include "Task.h" #include "OrxonoxPrereqs.h" /* die ganzen tolua, kopiert aus Dock.h*/ #include "ArtificialController.h" #include "core/EventIncludes.h" namespace orxonox // tolua_export { // tolua_export class _OrxonoxExport NewScriptController // tolua_export : public ArtificialController, public Tickable { // tolua_export public: NewScriptController(Context* context); virtual ~NewScriptController() { } void takeControl(int ctrlid); void setPlayer(PlayerInfo* player) { this->player_ = player; } virtual void tick(float dt) override; // LUA interface // tolua_begin void debugOut(); static NewScriptController* getNewScriptController(); int getID() { return ctrlid_; } //tolua_end void createAndAddTask(Task newTask); private: // Information about the player that this ScriptController will // control // - Player pointer PlayerInfo* player_; // - Entity pointer, this is for convenience and will be the same as // player_->getControllableEntity() ControllableEntity* entity_; // Controller ID, defaults to 0 and is set using takeControl() int ctrlid_; // List of events to walk through std::queue* taskList_; //List of Tasks currently active std::vector* activeTasks_; // Time since the creation of this ScriptController object float scTime_; };// tolua_export } // tolua_export #endif /* _NewScriptController_H__ */