Pause and Resume events completed and game-crashing bug fixed. I think.

This commit is contained in:
PlatinumSkink
2015-10-19 14:56:44 +02:00
parent 3fb741335e
commit 7aa7e7cbf0
23 changed files with 241 additions and 84 deletions
+13 -7
View File
@@ -11,6 +11,7 @@ void dd::Systems::LifebuoySystem::Initialize()
{
EVENT_SUBSCRIBE_MEMBER(m_EContact, &LifebuoySystem::OnContact);
EVENT_SUBSCRIBE_MEMBER(m_EPause, &LifebuoySystem::OnPause);
EVENT_SUBSCRIBE_MEMBER(m_EResume, &LifebuoySystem::OnResume);
EVENT_SUBSCRIBE_MEMBER(m_ELifebuoy, &LifebuoySystem::OnLifebuoy);
EVENT_SUBSCRIBE_MEMBER(m_ELifebuoyHit, &LifebuoySystem::OnLifebuoyHit);
@@ -88,18 +89,23 @@ void dd::Systems::LifebuoySystem::UpdateEntity(double dt, EntityID entity, Entit
bool dd::Systems::LifebuoySystem::OnPause(const dd::Events::Pause &event)
{
if (event.Type != "LifebuoySystem" && event.Type != "All") {
/*if (event.Type != "LifebuoySystem" && event.Type != "All") {
return false;
}
}*/
m_Pause = true;
if (IsPaused()) {
SetPause(false);
} else {
SetPause(true);
}
return true;
}
bool dd::Systems::LifebuoySystem::OnResume(const dd::Events::Resume &event)
{
/*if (event.Type != "LifebuoySystem" && event.Type != "All") {
return false;
}*/
m_Pause = false;
return true;
}
bool dd::Systems::LifebuoySystem::OnContact(const dd::Events::Contact &event)
{