public void UpdateMode(D2Data.Mode mode) { Mode = mode; bool wasDead = IsDead; IsDead = (Mode == D2Data.Mode.DEAD || Mode == D2Data.Mode.DEATH) && Level > 0; if (IsDead && !wasDead) { Deaths++; } }
public void UpdateMode(D2Data.Mode mode) { Mode = mode; // Handle player death. if (Level > 0 && (Mode == D2Data.Mode.DEAD || Mode == D2Data.Mode.DEATH)) { if (!IsDead) { IsDead = true; Deaths++; } } else { IsDead = false; } }