GameOver and WinScreen Added

This commit is contained in:
viktorljung
2015-10-08 23:18:54 +02:00
parent 9fe2324913
commit 95c1f57dd7
7 changed files with 58 additions and 3 deletions
+8 -2
View File
@@ -62,11 +62,17 @@ void dd::Systems::BallSystem::Initialize()
void dd::Systems::BallSystem::Update(double dt)
{
if (Lives() < 0)
if (Lives() == 0)
{
SetLives(3);
Events::GameOver e;
EventBroker->Publish(e);
Events::Pause p;
p.Type = "All";
EventBroker->Publish(p);
//TODO: Make this not so ugly
SetLives(-1);
}
ResolveContacts();
}