[Orxonox-commit 6860] r11481 - in code/branches/FlappyOrx_HS17: data/levels data/overlays src/modules src/modules/flappyorx
pascscha at orxonox.net
pascscha at orxonox.net
Mon Oct 16 15:28:15 CEST 2017
Author: pascscha
Date: 2017-10-16 15:28:14 +0200 (Mon, 16 Oct 2017)
New Revision: 11481
Added:
code/branches/FlappyOrx_HS17/data/levels/FlappyOrx.oxw
code/branches/FlappyOrx_HS17/data/overlays/FlappyHUD.oxo
code/branches/FlappyOrx_HS17/src/modules/flappyorx/
code/branches/FlappyOrx_HS17/src/modules/flappyorx/FlappyOrx.cc
code/branches/FlappyOrx_HS17/src/modules/flappyorx/FlappyOrx.h
Log:
Empty Game
Added: code/branches/FlappyOrx_HS17/data/levels/FlappyOrx.oxw
===================================================================
--- code/branches/FlappyOrx_HS17/data/levels/FlappyOrx.oxw (rev 0)
+++ code/branches/FlappyOrx_HS17/data/levels/FlappyOrx.oxw 2017-10-16 13:28:14 UTC (rev 11481)
@@ -0,0 +1,30 @@
+<LevelInfo
+ name = "Flappy Orx"
+ description = "TODO"
+ tags = "minigame"
+ screenshot = "orxonoxArcade.png"
+/>
+
+<?lua
+ include("overlays/FlappyHUD.oxo")
+?>
+
+<Level
+>
+ <Scene
+ ambientlight = "0.8, 0.7, 0.4"
+ skybox = "Orxonox/skyBoxBasic"
+ >
+
+ <WorldAmbientSound
+ source="Earth.ogg"
+ looping="true"
+ playOnLoad="true"
+ />
+
+ <Light type=directional position="1100, 11000, -7000" lookat="0, 0, 0" diffuse="1.0, 0.9, 0.9, 1.0" specular="1.0, 0.9, 0.9, 1.0" />
+ <SpawnPoint team=0 position="-200,0,0" lookat="0,0,0"/>
+
+
+ </Scene>
+</Level>
\ No newline at end of file
Added: code/branches/FlappyOrx_HS17/data/overlays/FlappyHUD.oxo
===================================================================
--- code/branches/FlappyOrx_HS17/data/overlays/FlappyHUD.oxo (rev 0)
+++ code/branches/FlappyOrx_HS17/data/overlays/FlappyHUD.oxo 2017-10-16 13:28:14 UTC (rev 11481)
@@ -0,0 +1,20 @@
+<Template name="spectatorhud">
+ <OverlayGroup name = "spectatorhud" scale = "1, 1">
+ </OverlayGroup>
+</Template>
+
+<Template name="FlappyHUD">
+ <OverlayGroup name="FlappyHUD" scale = "1, 1">
+
+ <OverlayText
+ position = "0.02, 0.02"
+ pickpoint = "0.0, 0.0"
+ font = "ShareTechMono"
+ textsize = 0.04
+ colour = "1.0, 1.0, 1.0, 1.0"
+ align = "left"
+ caption = "Distance: "
+ />
+
+</OverlayGroup>
+</Template>
\ No newline at end of file
Added: code/branches/FlappyOrx_HS17/src/modules/flappyorx/FlappyOrx.cc
===================================================================
--- code/branches/FlappyOrx_HS17/src/modules/flappyorx/FlappyOrx.cc (rev 0)
+++ code/branches/FlappyOrx_HS17/src/modules/flappyorx/FlappyOrx.cc 2017-10-16 13:28:14 UTC (rev 11481)
@@ -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:
+ * Florian Zinggeler
+ * Co-authors:
+ * ...
+ *
+ */
+
+/**
+ @file FlappyOrx.cc
+*/
+
+
+namespace orxonox
+{
+ RegisterUnloadableClass(FlappyOrx);
+
+ FlappyOrx::FlappyOrx(Context* context) : Deathmatch(context)
+ {
+ RegisterObject(FlappyOrx);
+ this->setHUDTemplate("FlappyHUD");
+ }
+
+ void FlappyOrx::start()
+ {
+ Deathmatch::start();
+ }
+
+ void FlappyOrx::end()
+ {
+ // DON'T CALL THIS!
+ // Deathmatch::end();
+ // It will misteriously crash the game!
+ // Instead startMainMenu, this won't crash.
+ GSLevel::startMainMenu();
+ }
+}
Added: code/branches/FlappyOrx_HS17/src/modules/flappyorx/FlappyOrx.h
===================================================================
--- code/branches/FlappyOrx_HS17/src/modules/flappyorx/FlappyOrx.h (rev 0)
+++ code/branches/FlappyOrx_HS17/src/modules/flappyorx/FlappyOrx.h 2017-10-16 13:28:14 UTC (rev 11481)
@@ -0,0 +1,56 @@
+/*
+ * 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:
+ * Florian Zinggeler
+ * Co-authors:
+ * ...
+ *
+ */
+
+/**
+ @file FlappyOrx.h
+ @brief Gametype.
+ @ingroup FlappyOrx
+*/
+
+#ifndef _FlappyOrx_H__
+#define _FlappyOrx_H__
+
+#include "gametypes/Deathmatch.h"
+
+namespace orxonox
+{
+
+ class _FlappyOrxExport FlappyOrx : public Deathmatch
+ {
+ public:
+ FlappyOrx(Context* context);
+
+ virtual void start() override;
+ virtual void end() override;
+
+ private:
+ void toggleShowLevel(){bShowLevel = !bShowLevel;}
+ };
+}
+
+#endif /* _FlappyOrx_H__ */
More information about the Orxonox-commit
mailing list