Added a cheatmode setting in config

This commit is contained in:
tleety
2015-10-19 15:56:26 +02:00
parent 36947611d3
commit 7b428f2b54
5 changed files with 19 additions and 4 deletions
+5 -2
View File
@@ -64,6 +64,8 @@ void dd::Systems::BallSystem::Initialize()
for (int i = 0; i < Lives(); i++) {
CreateLife(i);
}
m_GodMode = ResourceManager::Load<ConfigFile>("Config.ini")->GetValue<bool>("Cheat.GodMode", false);
}
void dd::Systems::BallSystem::Update(double dt)
@@ -445,8 +447,9 @@ void dd::Systems::BallSystem::CreateLife(int number)
bool dd::Systems::BallSystem::OnLifeLost(const dd::Events::LifeLost &event)
{
SetLives(Lives() - 1);
if (!m_GodMode){
SetLives(Lives() - 1);
}
return true;
}