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
+8 -1
View File
@@ -9,6 +9,7 @@ void dd::Systems::AnimationSystem::RegisterComponents(ComponentFactory* cf)
void dd::Systems::AnimationSystem::Initialize()
{
EVENT_SUBSCRIBE_MEMBER(m_EPause, &AnimationSystem::OnPause);
EVENT_SUBSCRIBE_MEMBER(m_EResume, &AnimationSystem::OnResume);
}
void dd::Systems::AnimationSystem::Update(double dt)
@@ -30,6 +31,12 @@ void dd::Systems::AnimationSystem::Update(double dt)
bool dd::Systems::AnimationSystem::OnPause(const Events::Pause& e)
{
m_Paused = !m_Paused;
m_Paused = true;
return true;
}
bool dd::Systems::AnimationSystem::OnResume(const Events::Resume& e)
{
m_Paused = false;
return true;
}