[Orxonox-commit 5351] r10014 - code/branches/ScriptableController/src/orxonox/controllers

samuezu at orxonox.net samuezu at orxonox.net
Thu Apr 3 13:55:15 CEST 2014


Author: samuezu
Date: 2014-04-03 13:55:14 +0200 (Thu, 03 Apr 2014)
New Revision: 10014

Added:
   code/branches/ScriptableController/src/orxonox/controllers/ScriptController.cc
   code/branches/ScriptableController/src/orxonox/controllers/ScriptController.h
Log:
re-added the scriptcontroller files

Added: code/branches/ScriptableController/src/orxonox/controllers/ScriptController.cc
===================================================================
--- code/branches/ScriptableController/src/orxonox/controllers/ScriptController.cc	                        (rev 0)
+++ code/branches/ScriptableController/src/orxonox/controllers/ScriptController.cc	2014-04-03 11:55:14 UTC (rev 10014)
@@ -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:
+ *      Fabian 'x3n' Landau
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#include "ScriptController.h"
+#include "core/CoreIncludes.h"
+
+namespace orxonox
+{
+    RegisterClass(ScriptController);
+
+    ScriptController::ScriptController(Context* context) : ArtificialController(context)
+    {
+        RegisterObject(ScriptController);
+    }
+
+    bool ScriptController::execute(bool bTriggered, BaseObject* trigger)
+    {
+        orxout(verbose)<<"hello universe"<<endl;
+        return true;
+    }
+
+
+    void ScriptController::XMLPort(Element& xmlelement, XMLPort::Mode mode)
+    {
+    	XMLPortEventSink(ScriptController, BaseObject, "execute", execute, xmlelement, mode);
+
+    }
+
+
+
+
+}

Added: code/branches/ScriptableController/src/orxonox/controllers/ScriptController.h
===================================================================
--- code/branches/ScriptableController/src/orxonox/controllers/ScriptController.h	                        (rev 0)
+++ code/branches/ScriptableController/src/orxonox/controllers/ScriptController.h	2014-04-03 11:55:14 UTC (rev 10014)
@@ -0,0 +1,55 @@
+/*
+ *   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:
+ *      Fabian 'x3n' Landau
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#ifndef _ScriptController_H__
+#define _ScriptController_H__
+
+#include "OrxonoxPrereqs.h"
+#include "ArtificialController.h"
+#include "core/EventIncludes.h"
+
+
+namespace orxonox
+{
+    class _OrxonoxExport ScriptController : public ArtificialController
+    {
+        public:
+            ScriptController(Context* context);
+            virtual ~ScriptController() { }
+
+            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
+            bool execute(bool bTriggered, BaseObject* trigger);
+
+
+        private:
+
+
+    };
+}
+
+#endif /* _ScriptController_H__ */




More information about the Orxonox-commit mailing list