[Orxonox-commit 4727] r9396 - in code/branches/SpaceshipNavigation2: data/overlays src/modules/overlays src/modules/overlays/hud src/orxonox/worldentities
soroa at orxonox.net
soroa at orxonox.net
Mon Oct 15 15:43:47 CEST 2012
Author: soroa
Date: 2012-10-15 15:43:47 +0200 (Mon, 15 Oct 2012)
New Revision: 9396
Added:
code/branches/SpaceshipNavigation2/src/modules/overlays/hud/HUDFindClosestEnemy.cc
code/branches/SpaceshipNavigation2/src/modules/overlays/hud/HUDFindClosestEnemy.h
Modified:
code/branches/SpaceshipNavigation2/data/overlays/HUD.oxo
code/branches/SpaceshipNavigation2/src/modules/overlays/OverlaysPrereqs.h
code/branches/SpaceshipNavigation2/src/modules/overlays/hud/CMakeLists.txt
code/branches/SpaceshipNavigation2/src/orxonox/worldentities/ControllableEntity.cc
Log:
Created a new class called FindClosestEnemy
Modified: code/branches/SpaceshipNavigation2/data/overlays/HUD.oxo
===================================================================
--- code/branches/SpaceshipNavigation2/data/overlays/HUD.oxo 2012-10-15 13:12:13 UTC (rev 9395)
+++ code/branches/SpaceshipNavigation2/data/overlays/HUD.oxo 2012-10-15 13:43:47 UTC (rev 9396)
@@ -77,6 +77,13 @@
halfDotSizeDistance = 3000
maximumDotSize = 0.1
/>
+ <HUDFindClosestEnemy
+ name = "FindClosestEnemy"
+ correctAspect = true
+ font = "Monofur"
+ textSize = 0.05
+
+ />
<ChatOverlay
name = "chat"
@@ -85,6 +92,11 @@
caption = ""
textSize = 0.025
/>
+ <FindClosestEnemy
+
+
+
+ />
</OverlayGroup>
Modified: code/branches/SpaceshipNavigation2/src/modules/overlays/OverlaysPrereqs.h
===================================================================
--- code/branches/SpaceshipNavigation2/src/modules/overlays/OverlaysPrereqs.h 2012-10-15 13:12:13 UTC (rev 9395)
+++ code/branches/SpaceshipNavigation2/src/modules/overlays/OverlaysPrereqs.h 2012-10-15 13:43:47 UTC (rev 9396)
@@ -90,6 +90,7 @@
class HUDSpeedBar;
class HUDBoostBar;
class HUDTimer;
+ class HUDFindClosestEnemy;
class KillMessage;
class LastManStandingInfos;
class PauseNotice;
Modified: code/branches/SpaceshipNavigation2/src/modules/overlays/hud/CMakeLists.txt
===================================================================
--- code/branches/SpaceshipNavigation2/src/modules/overlays/hud/CMakeLists.txt 2012-10-15 13:12:13 UTC (rev 9395)
+++ code/branches/SpaceshipNavigation2/src/modules/overlays/hud/CMakeLists.txt 2012-10-15 13:43:47 UTC (rev 9396)
@@ -6,6 +6,7 @@
HUDBoostBar.cc
HUDHealthBar.cc
HUDTimer.cc
+ HUDFindClosestEnemy.cc
HUDEnemyHealthBar.cc
ChatOverlay.cc
AnnounceMessage.cc
Added: code/branches/SpaceshipNavigation2/src/modules/overlays/hud/HUDFindClosestEnemy.cc
===================================================================
--- code/branches/SpaceshipNavigation2/src/modules/overlays/hud/HUDFindClosestEnemy.cc (rev 0)
+++ code/branches/SpaceshipNavigation2/src/modules/overlays/hud/HUDFindClosestEnemy.cc 2012-10-15 13:43:47 UTC (rev 9396)
@@ -0,0 +1,85 @@
+/*
+ * 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:
+ * Andrea Soro
+ *
+ */
+
+#include "HUDFindClosestEnemy.h"
+
+/*#include <OgreCamera.h>
+#include <OgreFontManager.h>
+#include <OgreOverlayManager.h>
+#include <OgreTextAreaOverlayElement.h>
+#include <OgrePanelOverlayElement.h>*/
+
+#include "util/Math.h"
+#include "util/Convert.h"
+#include "core/CoreIncludes.h"
+#include "core/XMLPort.h"
+#include "CameraManager.h"
+#include "Scene.h"
+#include "Radar.h"
+#include "graphics/Camera.h"
+#include "controllers/HumanController.h"
+#include "worldentities/pawns/Pawn.h"
+#include "worldentities/WorldEntity.h"
+#include "core/ConfigValueIncludes.h"
+#include "tools/TextureGenerator.h"
+// #include <boost/bind/bind_template.hpp>
+
+
+namespace orxonox
+{
+ CreateFactory ( HUDFindClosestEnemy );
+
+ HUDFindClosestEnemy::HUDFindClosestEnemy(BaseObject* creator) :HUDNavigation(creator)
+ {
+ orxout()<<"ClosestEnemyFinder activated"<<endl;
+ }
+
+ HUDFindClosestEnemy::~HUDFindClosestEnemy()
+ {
+
+ }
+
+
+ void HUDFindClosestEnemy::XMLPort(Element& xmlelement, XMLPort::Mode mode)
+ {
+ SUPER(HUDFindClosestEnemy, XMLPort, xmlelement, mode);
+
+ }
+
+
+
+
+ void HUDFindClosestEnemy::tick(float dt)
+ {
+ SUPER(HUDFindClosestEnemy, tick, dt);
+
+
+ }
+
+
+
+
+}
Added: code/branches/SpaceshipNavigation2/src/modules/overlays/hud/HUDFindClosestEnemy.h
===================================================================
--- code/branches/SpaceshipNavigation2/src/modules/overlays/hud/HUDFindClosestEnemy.h (rev 0)
+++ code/branches/SpaceshipNavigation2/src/modules/overlays/hud/HUDFindClosestEnemy.h 2012-10-15 13:43:47 UTC (rev 9396)
@@ -0,0 +1,43 @@
+/*
+ * HUDFindClosestEnemy.h
+ *
+ * Created on: Oct 15, 2012
+ * Author: soroa
+ */
+
+
+#ifndef _HUDFindClosestEnemy_H__
+#define _HUDFindClosestEnemy_H__
+
+#include "overlays/OverlaysPrereqs.h"
+
+#include <map>
+#include <string>
+
+#include "util/OgreForwardRefs.h"
+#include "tools/interfaces/Tickable.h"
+#include "interfaces/RadarListener.h"
+#include "overlays/OrxonoxOverlay.h"
+#include "HUDNavigation.h"
+
+namespace orxonox
+{
+ class _OverlaysExport HUDFindClosestEnemy : public HUDNavigation
+ {
+ public:
+ HUDFindClosestEnemy(BaseObject* creator);
+ virtual ~HUDFindClosestEnemy();
+ virtual void tick(float dt);
+ virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
+
+ private:
+
+
+
+ };
+}
+
+
+
+
+#endif /* _HUDFindClosestEnemy_H__ */
Modified: code/branches/SpaceshipNavigation2/src/orxonox/worldentities/ControllableEntity.cc
===================================================================
--- code/branches/SpaceshipNavigation2/src/orxonox/worldentities/ControllableEntity.cc 2012-10-15 13:12:13 UTC (rev 9395)
+++ code/branches/SpaceshipNavigation2/src/orxonox/worldentities/ControllableEntity.cc 2012-10-15 13:43:47 UTC (rev 9396)
@@ -1,4 +1,4 @@
-/*
+ /*
* ORXONOX - the hottest 3D action shooter ever to exist
* > www.orxonox.net <
*
More information about the Orxonox-commit
mailing list