From 0bbaf1d57678e6e7745d4fe55466b3330a2f2afe Mon Sep 17 00:00:00 2001 From: verysecrethero Date: Thu, 4 Feb 2016 10:04:44 +0100 Subject: [PATCH] Oops! Removed DebugCode... --- include/Game/Systems/PlayerDeathSystem.h | 5 ---- src/Game/Systems/PlayerDeathSystem.cpp | 31 ------------------------ 2 files changed, 36 deletions(-) diff --git a/include/Game/Systems/PlayerDeathSystem.h b/include/Game/Systems/PlayerDeathSystem.h index 4734947e..7d989dbf 100644 --- a/include/Game/Systems/PlayerDeathSystem.h +++ b/include/Game/Systems/PlayerDeathSystem.h @@ -11,7 +11,6 @@ #include "Core/EntityFileParser.h" #include "Core/EPlayerDeath.h" -#include "Core/EPlayerDamage.h" class PlayerDeathSystem : public ImpureSystem { @@ -23,9 +22,5 @@ public: private: EventRelay m_OnPlayerDeath; bool OnPlayerDeath(Events::PlayerDeath& e); - - EventRelay m_OnInputCommand; - bool OnInputCommand(const Events::InputCommand& e); - }; #endif \ No newline at end of file diff --git a/src/Game/Systems/PlayerDeathSystem.cpp b/src/Game/Systems/PlayerDeathSystem.cpp index d6680928..f7fe1ab5 100644 --- a/src/Game/Systems/PlayerDeathSystem.cpp +++ b/src/Game/Systems/PlayerDeathSystem.cpp @@ -3,40 +3,9 @@ PlayerDeathSystem::PlayerDeathSystem(World* m_World, EventBroker* eventBroker) : System(m_World, eventBroker) { - EVENT_SUBSCRIBE_MEMBER(m_OnInputCommand, &PlayerDeathSystem::OnInputCommand); EVENT_SUBSCRIBE_MEMBER(m_OnPlayerDeath, &PlayerDeathSystem::OnPlayerDeath); } -bool PlayerDeathSystem::OnInputCommand(const Events::InputCommand& e) -{ - //testing: Jump > playerdamage - if (e.Command != "Jump") { - return false; - - } - - // 0 = released - if (e.Value != 0) { - return false; - - } - - auto players = m_World->GetComponents("Player"); - - for (auto& cPlayer : *players) { - EntityWrapper player(m_World, cPlayer.EntityID); - Events::PlayerDamage e; - e.Player = player; - e.Damage = 50; - m_EventBroker->Publish(e); - - } - - - - return true; -} - void PlayerDeathSystem::Update(double dt) { }