Walls are now destroyable

This commit is contained in:
Tleety
2014-06-04 14:48:40 +02:00
parent 7b90e54899
commit 6cae09c5d8
5 changed files with 34 additions and 35 deletions
+6 -6
View File
@@ -18,12 +18,12 @@ bool Systems::DamageSystem::OnDamage( const Events::Damage &event )
return false;
auto health = m_World->GetComponent<Components::Health>(event.Entity);
health->Amount -= event.Amount;
if(health->Amount <= 0)
{
Events::OnDead e;
e.Entity = event.Entity;
EventBroker->Publish(e);
}
//if(health->Amount <= 0)
//{
// Events::OnDead e;
// e.Entity = event.Entity;
// EventBroker->Publish(e);
//}
LOG_INFO("Damaged entity %i, Health left: %f", event.Entity, health->Amount);
return true;
}