Temp feature: Write deaths/restarts to text file
This commit is contained in:
parent
4928a82fb0
commit
f448b6a460
@ -106,6 +106,7 @@ namespace rabi_splitter_WPF
|
||||
if (InGame())
|
||||
{
|
||||
inGameState.nRestarts++;
|
||||
UpdateTextFile();
|
||||
}
|
||||
DebugLog("Reload Game! " + snapshot.playtime + " <- " + inGameState.lastNonZeroPlayTime);
|
||||
}
|
||||
@ -123,6 +124,7 @@ namespace rabi_splitter_WPF
|
||||
if (InGame())
|
||||
{
|
||||
inGameState.nDeaths++;
|
||||
UpdateTextFile();
|
||||
}
|
||||
DebugLog("Death!");
|
||||
}
|
||||
@ -197,6 +199,14 @@ namespace rabi_splitter_WPF
|
||||
}
|
||||
}
|
||||
|
||||
private void UpdateTextFile()
|
||||
{
|
||||
string text = $"Deaths: {inGameState.nDeaths}\nResets: {inGameState.nRestarts}";
|
||||
System.IO.StreamWriter file = new System.IO.StreamWriter("deaths_restarts.txt");
|
||||
file.WriteLine(text);
|
||||
file.Close();
|
||||
}
|
||||
|
||||
private void StartNewGame()
|
||||
{
|
||||
inGameState = new InGameState();
|
||||
|
Loading…
x
Reference in New Issue
Block a user