[Orxonox-commit 6538] r11179 - code/branches/plehmannFS16/src/orxonox/controllers
plehmann at orxonox.net
plehmann at orxonox.net
Thu Apr 28 16:09:08 CEST 2016
Author: plehmann
Date: 2016-04-28 16:09:08 +0200 (Thu, 28 Apr 2016)
New Revision: 11179
Added:
code/branches/plehmannFS16/src/orxonox/controllers/stringOutTask.cc
code/branches/plehmannFS16/src/orxonox/controllers/stringOutTask.h
Log:
added the stringOutTask for scriptcontroller
Added: code/branches/plehmannFS16/src/orxonox/controllers/stringOutTask.cc
===================================================================
--- code/branches/plehmannFS16/src/orxonox/controllers/stringOutTask.cc (rev 0)
+++ code/branches/plehmannFS16/src/orxonox/controllers/stringOutTask.cc 2016-04-28 14:09:08 UTC (rev 11179)
@@ -0,0 +1,50 @@
+/*
+ * 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:
+ * ...
+ *
+ */
+
+
+#include "stringOutTask.h"
+
+#include "infos/PlayerInfo.h"
+#include "controllers/ArtificialController.h"
+
+namespace orxonox
+{
+
+ RegisterClass(stringOutTask);
+
+ stringOutTask::stringOutTask(Context* context): Task(context)
+ {
+ RegisterObject(stringOutTask);
+ }
+
+ void stringOutTask::tick(float dt)
+ {
+ orxout() << output_ << endl;
+ }
+
+}
\ No newline at end of file
Added: code/branches/plehmannFS16/src/orxonox/controllers/stringOutTask.h
===================================================================
--- code/branches/plehmannFS16/src/orxonox/controllers/stringOutTask.h (rev 0)
+++ code/branches/plehmannFS16/src/orxonox/controllers/stringOutTask.h 2016-04-28 14:09:08 UTC (rev 11179)
@@ -0,0 +1,57 @@
+/*
+ * 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 _stringOutTask_H__
+#define _stringOutTask_H__
+
+#include "infos/PlayerInfo.h"
+#include "controllers/ArtificialController.h"
+#include "tools/interfaces/Tickable.h"
+#include "Task.h"
+
+namespace orxonox
+{
+ class _OrxonoxExport stringOutTask : public Task
+ {
+ public:
+ stringOutTask(Context* context);
+ virtual ~stringOutTask(){}
+
+ void initialize(float startTime, std::string output)
+ {this->startTime_ = startTime; this->output_ = output;}
+
+ virtual void tick(float dt) override;
+
+ private:
+
+ std::string output_;
+
+ };
+}
+
+#endif /* _stringOutTask_H__ */
\ No newline at end of file
More information about the Orxonox-commit
mailing list