Oops! Removed DebugCode...

This commit is contained in:
verysecrethero
2016-02-04 10:04:44 +01:00
parent 2961f198b3
commit 0bbaf1d576
2 changed files with 0 additions and 36 deletions
-5
View File
@@ -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<PlayerDeathSystem, Events::PlayerDeath> m_OnPlayerDeath;
bool OnPlayerDeath(Events::PlayerDeath& e);
EventRelay<PlayerDeathSystem, Events::InputCommand> m_OnInputCommand;
bool OnInputCommand(const Events::InputCommand& e);
};
#endif
-31
View File
@@ -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)
{
}