mirror of https://github.com/ppy/osu
Fixed Code Inspection Fails.
This commit is contained in:
parent
c195481223
commit
ca6a73cb9d
|
@ -2,11 +2,7 @@
|
||||||
// See the LICENCE file in the repository root for full licence text.
|
// See the LICENCE file in the repository root for full licence text.
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Threading;
|
|
||||||
using osu.Framework.Graphics.Sprites;
|
using osu.Framework.Graphics.Sprites;
|
||||||
using osu.Framework.Timing;
|
|
||||||
using osu.Game.Beatmaps;
|
using osu.Game.Beatmaps;
|
||||||
using osu.Game.Graphics;
|
using osu.Game.Graphics;
|
||||||
using osu.Game.Rulesets.Scoring;
|
using osu.Game.Rulesets.Scoring;
|
||||||
|
@ -15,7 +11,7 @@ namespace osu.Game.Rulesets.Mods
|
||||||
{
|
{
|
||||||
public abstract class ModEasy : Mod, IApplicableToDifficulty, IApplicableToScoreProcessor
|
public abstract class ModEasy : Mod, IApplicableToDifficulty, IApplicableToScoreProcessor
|
||||||
{
|
{
|
||||||
private int Lives;
|
private int lives;
|
||||||
public override string Name => "Easy";
|
public override string Name => "Easy";
|
||||||
public override string Acronym => "EZ";
|
public override string Acronym => "EZ";
|
||||||
public override IconUsage Icon => OsuIcon.ModEasy;
|
public override IconUsage Icon => OsuIcon.ModEasy;
|
||||||
|
@ -23,6 +19,7 @@ public abstract class ModEasy : Mod, IApplicableToDifficulty, IApplicableToScore
|
||||||
public override double ScoreMultiplier => 0.5;
|
public override double ScoreMultiplier => 0.5;
|
||||||
public override bool Ranked => true;
|
public override bool Ranked => true;
|
||||||
public override Type[] IncompatibleMods => new[] { typeof(ModHardRock) };
|
public override Type[] IncompatibleMods => new[] { typeof(ModHardRock) };
|
||||||
|
|
||||||
public void ApplyToDifficulty(BeatmapDifficulty difficulty)
|
public void ApplyToDifficulty(BeatmapDifficulty difficulty)
|
||||||
{
|
{
|
||||||
const float ratio = 0.5f;
|
const float ratio = 0.5f;
|
||||||
|
@ -38,12 +35,12 @@ public void ApplyToScoreProcessor(ScoreProcessor scoreProcessor)
|
||||||
//with each other / not reseting after a restart , as this method is called once a play starts (to my knowlegde).
|
//with each other / not reseting after a restart , as this method is called once a play starts (to my knowlegde).
|
||||||
//This will be better implemented with a List<double> once I know how to reliably get the game time and update it.
|
//This will be better implemented with a List<double> once I know how to reliably get the game time and update it.
|
||||||
//If you know any information about that, please contact me because I didn't find a sollution to that.
|
//If you know any information about that, please contact me because I didn't find a sollution to that.
|
||||||
Lives = 2;
|
lives = 2;
|
||||||
scoreProcessor.Health.ValueChanged += valueChanged =>
|
scoreProcessor.Health.ValueChanged += valueChanged =>
|
||||||
{
|
{
|
||||||
if (scoreProcessor.Health.Value == scoreProcessor.Health.MinValue && Lives > 0)
|
if (scoreProcessor.Health.Value == scoreProcessor.Health.MinValue && lives > 0)
|
||||||
{
|
{
|
||||||
Lives--;
|
lives--;
|
||||||
scoreProcessor.Health.Value = scoreProcessor.Health.MaxValue;
|
scoreProcessor.Health.Value = scoreProcessor.Health.MaxValue;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue