Reverted back Player.cs changes.

This commit is contained in:
RORIdev 2019-04-03 19:20:20 -03:00
parent ebaaaef4d6
commit 5aa284781e
2 changed files with 7 additions and 4 deletions

View File

@ -11,7 +11,7 @@ namespace osu.Game.Rulesets.Mods
{
public abstract class ModEasy : Mod, IApplicableToDifficulty, IApplicableToScoreProcessor
{
public static int Lives = 2;
public int Lives = 2;
public override string Name => "Easy";
public override string Acronym => "EZ";
public override IconUsage Icon => OsuIcon.ModEasy;
@ -31,7 +31,8 @@ public void ApplyToDifficulty(BeatmapDifficulty difficulty)
public void ApplyToScoreProcessor(ScoreProcessor scoreProcessor)
{
scoreProcessor.Health.ValueChanged += valueChanged =>{
scoreProcessor.Health.ValueChanged += valueChanged =>
{
if (scoreProcessor.Health.Value == 0)
{
if (Lives != 0)

View File

@ -51,8 +51,6 @@ public class Player : ScreenWithBeatmapBackground
public int RestartCount;
public int Lives = 2;
[Resolved]
private ScoreManager scoreManager { get; set; }
@ -329,13 +327,17 @@ private bool onFail()
{
if (Beatmap.Value.Mods.Value.OfType<IApplicableFailOverride>().Any(m => !m.AllowFail))
return false;
GameplayClockContainer.Stop();
HasFailed = true;
// There is a chance that we could be in a paused state as the ruleset's internal clock (see FrameStabilityContainer)
// could process an extra frame after the GameplayClock is stopped.
// In such cases we want the fail state to precede a user triggered pause.
if (PauseOverlay.State == Visibility.Visible)
PauseOverlay.Hide();
FailOverlay.Retries = RestartCount;
FailOverlay.Show();
return true;