1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-15 23:23:04 +08:00

Merge branch 'master' into song-select-improvements

This commit is contained in:
Dan Balasescu 2017-03-23 20:25:38 +09:00 committed by GitHub
commit 8901d6137e
35 changed files with 82 additions and 88 deletions

View File

@ -136,7 +136,7 @@ namespace osu.Desktop.VisualTests.Tests
if (auto) if (auto)
{ {
h.State = ArmedState.Hit; h.State = ArmedState.Hit;
h.Judgement = new OsuJudgementInfo { Result = HitResult.Hit }; h.Judgement = new OsuJudgement { Result = HitResult.Hit };
} }
playfieldContainer.Add(h); playfieldContainer.Add(h);

View File

@ -36,7 +36,7 @@ namespace osu.Desktop.VisualTests.Tests
playfield.OnJudgement(new DrawableTestHit(new Hit()) playfield.OnJudgement(new DrawableTestHit(new Hit())
{ {
X = RNG.NextSingle(hitResult == TaikoHitResult.Good ? -0.1f : -0.05f, hitResult == TaikoHitResult.Good ? 0.1f : 0.05f), X = RNG.NextSingle(hitResult == TaikoHitResult.Good ? -0.1f : -0.05f, hitResult == TaikoHitResult.Good ? 0.1f : 0.05f),
Judgement = new TaikoJudgementInfo Judgement = new TaikoJudgement
{ {
Result = HitResult.Hit, Result = HitResult.Hit,
TaikoResult = hitResult, TaikoResult = hitResult,
@ -51,7 +51,7 @@ namespace osu.Desktop.VisualTests.Tests
{ {
playfield.OnJudgement(new DrawableTestHit(new Hit()) playfield.OnJudgement(new DrawableTestHit(new Hit())
{ {
Judgement = new TaikoJudgementInfo Judgement = new TaikoJudgement
{ {
Result = HitResult.Miss, Result = HitResult.Miss,
TimeOffset = 0, TimeOffset = 0,
@ -60,14 +60,14 @@ namespace osu.Desktop.VisualTests.Tests
}); });
} }
private class DrawableTestHit : DrawableHitObject<TaikoHitObject, TaikoJudgementInfo> private class DrawableTestHit : DrawableHitObject<TaikoHitObject, TaikoJudgement>
{ {
public DrawableTestHit(TaikoHitObject hitObject) public DrawableTestHit(TaikoHitObject hitObject)
: base(hitObject) : base(hitObject)
{ {
} }
protected override TaikoJudgementInfo CreateJudgementInfo() => new TaikoJudgementInfo(); protected override TaikoJudgement CreateJudgement() => new TaikoJudgement();
protected override void UpdateState(ArmedState state) protected override void UpdateState(ArmedState state)
{ {

View File

@ -7,18 +7,18 @@ using osu.Game.Modes.UI;
namespace osu.Game.Modes.Catch namespace osu.Game.Modes.Catch
{ {
internal class CatchScoreProcessor : ScoreProcessor<CatchBaseHit, CatchJudgementInfo> internal class CatchScoreProcessor : ScoreProcessor<CatchBaseHit, CatchJudgement>
{ {
public CatchScoreProcessor() public CatchScoreProcessor()
{ {
} }
public CatchScoreProcessor(HitRenderer<CatchBaseHit, CatchJudgementInfo> hitRenderer) public CatchScoreProcessor(HitRenderer<CatchBaseHit, CatchJudgement> hitRenderer)
: base(hitRenderer) : base(hitRenderer)
{ {
} }
protected override void UpdateCalculations(CatchJudgementInfo newJudgement) protected override void UpdateCalculations(CatchJudgement newJudgement)
{ {
} }
} }

View File

@ -5,7 +5,7 @@ using osu.Game.Modes.Judgements;
namespace osu.Game.Modes.Catch.Judgements namespace osu.Game.Modes.Catch.Judgements
{ {
public class CatchJudgementInfo : JudgementInfo public class CatchJudgement : Judgement
{ {
public override string ScoreString => string.Empty; public override string ScoreString => string.Empty;

View File

@ -10,7 +10,7 @@ using osu.Game.Modes.UI;
namespace osu.Game.Modes.Catch.UI namespace osu.Game.Modes.Catch.UI
{ {
public class CatchHitRenderer : HitRenderer<CatchBaseHit, CatchJudgementInfo> public class CatchHitRenderer : HitRenderer<CatchBaseHit, CatchJudgement>
{ {
public CatchHitRenderer(WorkingBeatmap beatmap) public CatchHitRenderer(WorkingBeatmap beatmap)
: base(beatmap) : base(beatmap)
@ -23,8 +23,8 @@ namespace osu.Game.Modes.Catch.UI
protected override IBeatmapProcessor<CatchBaseHit> CreateBeatmapProcessor() => new CatchBeatmapProcessor(); protected override IBeatmapProcessor<CatchBaseHit> CreateBeatmapProcessor() => new CatchBeatmapProcessor();
protected override Playfield<CatchBaseHit, CatchJudgementInfo> CreatePlayfield() => new CatchPlayfield(); protected override Playfield<CatchBaseHit, CatchJudgement> CreatePlayfield() => new CatchPlayfield();
protected override DrawableHitObject<CatchBaseHit, CatchJudgementInfo> GetVisualRepresentation(CatchBaseHit h) => null; protected override DrawableHitObject<CatchBaseHit, CatchJudgement> GetVisualRepresentation(CatchBaseHit h) => null;
} }
} }

View File

@ -10,7 +10,7 @@ using osu.Game.Modes.Catch.Judgements;
namespace osu.Game.Modes.Catch.UI namespace osu.Game.Modes.Catch.UI
{ {
public class CatchPlayfield : Playfield<CatchBaseHit, CatchJudgementInfo> public class CatchPlayfield : Playfield<CatchBaseHit, CatchJudgement>
{ {
public CatchPlayfield() public CatchPlayfield()
{ {

View File

@ -51,7 +51,7 @@
<Compile Include="Beatmaps\CatchBeatmapProcessor.cs" /> <Compile Include="Beatmaps\CatchBeatmapProcessor.cs" />
<Compile Include="CatchDifficultyCalculator.cs" /> <Compile Include="CatchDifficultyCalculator.cs" />
<Compile Include="CatchScoreProcessor.cs" /> <Compile Include="CatchScoreProcessor.cs" />
<Compile Include="Judgements\CatchJudgementInfo.cs" /> <Compile Include="Judgements\CatchJudgement.cs" />
<Compile Include="Objects\CatchBaseHit.cs" /> <Compile Include="Objects\CatchBaseHit.cs" />
<Compile Include="Objects\Drawable\DrawableFruit.cs" /> <Compile Include="Objects\Drawable\DrawableFruit.cs" />
<Compile Include="Objects\Droplet.cs" /> <Compile Include="Objects\Droplet.cs" />

View File

@ -5,7 +5,7 @@ using osu.Game.Modes.Judgements;
namespace osu.Game.Modes.Mania.Judgements namespace osu.Game.Modes.Mania.Judgements
{ {
public class ManiaJudgementInfo : JudgementInfo public class ManiaJudgement : Judgement
{ {
public override string ScoreString => string.Empty; public override string ScoreString => string.Empty;

View File

@ -7,18 +7,18 @@ using osu.Game.Modes.UI;
namespace osu.Game.Modes.Mania namespace osu.Game.Modes.Mania
{ {
internal class ManiaScoreProcessor : ScoreProcessor<ManiaBaseHit, ManiaJudgementInfo> internal class ManiaScoreProcessor : ScoreProcessor<ManiaBaseHit, ManiaJudgement>
{ {
public ManiaScoreProcessor() public ManiaScoreProcessor()
{ {
} }
public ManiaScoreProcessor(HitRenderer<ManiaBaseHit, ManiaJudgementInfo> hitRenderer) public ManiaScoreProcessor(HitRenderer<ManiaBaseHit, ManiaJudgement> hitRenderer)
: base(hitRenderer) : base(hitRenderer)
{ {
} }
protected override void UpdateCalculations(ManiaJudgementInfo newJudgement) protected override void UpdateCalculations(ManiaJudgement newJudgement)
{ {
} }
} }

View File

@ -10,7 +10,7 @@ using osu.Game.Modes.UI;
namespace osu.Game.Modes.Mania.UI namespace osu.Game.Modes.Mania.UI
{ {
public class ManiaHitRenderer : HitRenderer<ManiaBaseHit, ManiaJudgementInfo> public class ManiaHitRenderer : HitRenderer<ManiaBaseHit, ManiaJudgement>
{ {
private readonly int columns; private readonly int columns;
@ -26,8 +26,8 @@ namespace osu.Game.Modes.Mania.UI
protected override IBeatmapProcessor<ManiaBaseHit> CreateBeatmapProcessor() => new ManiaBeatmapProcessor(); protected override IBeatmapProcessor<ManiaBaseHit> CreateBeatmapProcessor() => new ManiaBeatmapProcessor();
protected override Playfield<ManiaBaseHit, ManiaJudgementInfo> CreatePlayfield() => new ManiaPlayfield(columns); protected override Playfield<ManiaBaseHit, ManiaJudgement> CreatePlayfield() => new ManiaPlayfield(columns);
protected override DrawableHitObject<ManiaBaseHit, ManiaJudgementInfo> GetVisualRepresentation(ManiaBaseHit h) => null; protected override DrawableHitObject<ManiaBaseHit, ManiaJudgement> GetVisualRepresentation(ManiaBaseHit h) => null;
} }
} }

View File

@ -11,7 +11,7 @@ using osu.Game.Modes.Mania.Judgements;
namespace osu.Game.Modes.Mania.UI namespace osu.Game.Modes.Mania.UI
{ {
public class ManiaPlayfield : Playfield<ManiaBaseHit, ManiaJudgementInfo> public class ManiaPlayfield : Playfield<ManiaBaseHit, ManiaJudgement>
{ {
public ManiaPlayfield(int columns) public ManiaPlayfield(int columns)
{ {

View File

@ -49,7 +49,7 @@
<ItemGroup> <ItemGroup>
<Compile Include="Beatmaps\ManiaBeatmapConverter.cs" /> <Compile Include="Beatmaps\ManiaBeatmapConverter.cs" />
<Compile Include="Beatmaps\ManiaBeatmapProcessor.cs" /> <Compile Include="Beatmaps\ManiaBeatmapProcessor.cs" />
<Compile Include="Judgements\ManiaJudgementInfo.cs" /> <Compile Include="Judgements\ManiaJudgement.cs" />
<Compile Include="ManiaDifficultyCalculator.cs" /> <Compile Include="ManiaDifficultyCalculator.cs" />
<Compile Include="ManiaScoreProcessor.cs" /> <Compile Include="ManiaScoreProcessor.cs" />
<Compile Include="Objects\Drawable\DrawableNote.cs" /> <Compile Include="Objects\Drawable\DrawableNote.cs" />

View File

@ -8,7 +8,7 @@ using osu.Framework.Extensions;
namespace osu.Game.Modes.Osu.Judgements namespace osu.Game.Modes.Osu.Judgements
{ {
public class OsuJudgementInfo : JudgementInfo public class OsuJudgement : Judgement
{ {
/// <summary> /// <summary>
/// The positional hit offset. /// The positional hit offset.

View File

@ -7,7 +7,7 @@ using osu.Game.Modes.Osu.Judgements;
namespace osu.Game.Modes.Osu.Objects.Drawables namespace osu.Game.Modes.Osu.Objects.Drawables
{ {
public class DrawableOsuHitObject : DrawableHitObject<OsuHitObject, OsuJudgementInfo> public class DrawableOsuHitObject : DrawableHitObject<OsuHitObject, OsuJudgement>
{ {
public const float TIME_PREEMPT = 600; public const float TIME_PREEMPT = 600;
public const float TIME_FADEIN = 400; public const float TIME_FADEIN = 400;
@ -19,7 +19,7 @@ namespace osu.Game.Modes.Osu.Objects.Drawables
AccentColour = HitObject.ComboColour; AccentColour = HitObject.ComboColour;
} }
protected override OsuJudgementInfo CreateJudgementInfo() => new OsuJudgementInfo { MaxScore = OsuScoreResult.Hit300 }; protected override OsuJudgement CreateJudgement() => new OsuJudgement { MaxScore = OsuScoreResult.Hit300 };
protected override void UpdateState(ArmedState state) protected override void UpdateState(ArmedState state)
{ {

View File

@ -9,23 +9,18 @@ using osu.Game.Modes.Judgements;
namespace osu.Game.Modes.Osu.Objects.Drawables namespace osu.Game.Modes.Osu.Objects.Drawables
{ {
public class DrawableOsuJudgementInfo : DrawableJudgementInfo<OsuJudgementInfo> public class DrawableOsuJudgement : DrawableJudgement<OsuJudgement>
{ {
public DrawableOsuJudgementInfo(OsuJudgementInfo judgement) : base(judgement) public DrawableOsuJudgement(OsuJudgement judgement) : base(judgement)
{ {
} }
protected override void LoadComplete() protected override void LoadComplete()
{ {
base.LoadComplete();
if (Judgement.Result != HitResult.Miss) if (Judgement.Result != HitResult.Miss)
{
JudgementText.TransformSpacingTo(new Vector2(14, 0), 1800, EasingTypes.OutQuint); JudgementText.TransformSpacingTo(new Vector2(14, 0), 1800, EasingTypes.OutQuint);
FadeOut(500);
}
Expire(); base.LoadComplete();
} }
} }
} }

View File

@ -27,7 +27,7 @@ namespace osu.Game.Modes.Osu.Objects.Drawables
public override bool RemoveWhenNotAlive => false; public override bool RemoveWhenNotAlive => false;
protected override OsuJudgementInfo CreateJudgementInfo() => new OsuJudgementInfo { MaxScore = OsuScoreResult.SliderTick }; protected override OsuJudgement CreateJudgement() => new OsuJudgement { MaxScore = OsuScoreResult.SliderTick };
public DrawableSliderTick(SliderTick sliderTick) : base(sliderTick) public DrawableSliderTick(SliderTick sliderTick) : base(sliderTick)
{ {

View File

@ -8,13 +8,13 @@ using osu.Game.Modes.UI;
namespace osu.Game.Modes.Osu namespace osu.Game.Modes.Osu
{ {
internal class OsuScoreProcessor : ScoreProcessor<OsuHitObject, OsuJudgementInfo> internal class OsuScoreProcessor : ScoreProcessor<OsuHitObject, OsuJudgement>
{ {
public OsuScoreProcessor() public OsuScoreProcessor()
{ {
} }
public OsuScoreProcessor(HitRenderer<OsuHitObject, OsuJudgementInfo> hitRenderer) public OsuScoreProcessor(HitRenderer<OsuHitObject, OsuJudgement> hitRenderer)
: base(hitRenderer) : base(hitRenderer)
{ {
} }
@ -27,7 +27,7 @@ namespace osu.Game.Modes.Osu
Accuracy.Value = 1; Accuracy.Value = 1;
} }
protected override void UpdateCalculations(OsuJudgementInfo judgement) protected override void UpdateCalculations(OsuJudgement judgement)
{ {
if (judgement != null) if (judgement != null)
{ {
@ -47,9 +47,8 @@ namespace osu.Game.Modes.Osu
int score = 0; int score = 0;
int maxScore = 0; int maxScore = 0;
foreach (var judgementInfo in Judgements) foreach (var j in Judgements)
{ {
var j = judgementInfo;
score += j.ScoreValue; score += j.ScoreValue;
maxScore += j.MaxScoreValue; maxScore += j.MaxScoreValue;
} }

View File

@ -12,7 +12,7 @@ using osu.Game.Screens.Play;
namespace osu.Game.Modes.Osu.UI namespace osu.Game.Modes.Osu.UI
{ {
public class OsuHitRenderer : HitRenderer<OsuHitObject, OsuJudgementInfo> public class OsuHitRenderer : HitRenderer<OsuHitObject, OsuJudgement>
{ {
public OsuHitRenderer(WorkingBeatmap beatmap) public OsuHitRenderer(WorkingBeatmap beatmap)
: base(beatmap) : base(beatmap)
@ -25,11 +25,11 @@ namespace osu.Game.Modes.Osu.UI
protected override IBeatmapProcessor<OsuHitObject> CreateBeatmapProcessor() => new OsuBeatmapProcessor(); protected override IBeatmapProcessor<OsuHitObject> CreateBeatmapProcessor() => new OsuBeatmapProcessor();
protected override Playfield<OsuHitObject, OsuJudgementInfo> CreatePlayfield() => new OsuPlayfield(); protected override Playfield<OsuHitObject, OsuJudgement> CreatePlayfield() => new OsuPlayfield();
protected override KeyConversionInputManager CreateKeyConversionInputManager() => new OsuKeyConversionInputManager(); protected override KeyConversionInputManager CreateKeyConversionInputManager() => new OsuKeyConversionInputManager();
protected override DrawableHitObject<OsuHitObject, OsuJudgementInfo> GetVisualRepresentation(OsuHitObject h) protected override DrawableHitObject<OsuHitObject, OsuJudgement> GetVisualRepresentation(OsuHitObject h)
{ {
var circle = h as HitCircle; var circle = h as HitCircle;
if (circle != null) if (circle != null)

View File

@ -15,7 +15,7 @@ using osu.Game.Modes.Osu.Judgements;
namespace osu.Game.Modes.Osu.UI namespace osu.Game.Modes.Osu.UI
{ {
public class OsuPlayfield : Playfield<OsuHitObject, OsuJudgementInfo> public class OsuPlayfield : Playfield<OsuHitObject, OsuJudgement>
{ {
private readonly Container approachCircles; private readonly Container approachCircles;
private readonly Container judgementLayer; private readonly Container judgementLayer;
@ -65,7 +65,7 @@ namespace osu.Game.Modes.Osu.UI
AddInternal(new GameplayCursor()); AddInternal(new GameplayCursor());
} }
public override void Add(DrawableHitObject<OsuHitObject, OsuJudgementInfo> h) public override void Add(DrawableHitObject<OsuHitObject, OsuJudgement> h)
{ {
h.Depth = (float)h.HitObject.StartTime; h.Depth = (float)h.HitObject.StartTime;
@ -83,9 +83,9 @@ namespace osu.Game.Modes.Osu.UI
.OrderBy(h => h.StartTime); .OrderBy(h => h.StartTime);
} }
public override void OnJudgement(DrawableHitObject<OsuHitObject, OsuJudgementInfo> judgedObject) public override void OnJudgement(DrawableHitObject<OsuHitObject, OsuJudgement> judgedObject)
{ {
DrawableOsuJudgementInfo explosion = new DrawableOsuJudgementInfo(judgedObject.Judgement) DrawableOsuJudgement explosion = new DrawableOsuJudgement(judgedObject.Judgement)
{ {
Origin = Anchor.Centre, Origin = Anchor.Centre,
Position = judgedObject.HitObject.StackedEndPosition + judgedObject.Judgement.PositionOffset Position = judgedObject.HitObject.StackedEndPosition + judgedObject.Judgement.PositionOffset

View File

@ -48,7 +48,7 @@
<Compile Include="Objects\Drawables\DrawableOsuHitObject.cs" /> <Compile Include="Objects\Drawables\DrawableOsuHitObject.cs" />
<Compile Include="Objects\Drawables\Connections\ConnectionRenderer.cs" /> <Compile Include="Objects\Drawables\Connections\ConnectionRenderer.cs" />
<Compile Include="Objects\Drawables\Connections\FollowPointRenderer.cs" /> <Compile Include="Objects\Drawables\Connections\FollowPointRenderer.cs" />
<Compile Include="Judgements\OsuJudgementInfo.cs" /> <Compile Include="Judgements\OsuJudgement.cs" />
<Compile Include="Objects\Drawables\Pieces\ApproachCircle.cs" /> <Compile Include="Objects\Drawables\Pieces\ApproachCircle.cs" />
<Compile Include="Objects\Drawables\Pieces\SpinnerBackground.cs" /> <Compile Include="Objects\Drawables\Pieces\SpinnerBackground.cs" />
<Compile Include="Objects\Drawables\Pieces\CirclePiece.cs" /> <Compile Include="Objects\Drawables\Pieces\CirclePiece.cs" />
@ -58,7 +58,7 @@
<Compile Include="Objects\Drawables\Pieces\ExplodePiece.cs" /> <Compile Include="Objects\Drawables\Pieces\ExplodePiece.cs" />
<Compile Include="Objects\Drawables\Pieces\FlashPiece.cs" /> <Compile Include="Objects\Drawables\Pieces\FlashPiece.cs" />
<Compile Include="Objects\Drawables\Pieces\GlowPiece.cs" /> <Compile Include="Objects\Drawables\Pieces\GlowPiece.cs" />
<Compile Include="Objects\Drawables\DrawableOsuJudgementInfo.cs" /> <Compile Include="Objects\Drawables\DrawableOsuJudgement.cs" />
<Compile Include="Objects\Drawables\Pieces\NumberPiece.cs" /> <Compile Include="Objects\Drawables\Pieces\NumberPiece.cs" />
<Compile Include="Objects\Drawables\DrawableSliderTick.cs" /> <Compile Include="Objects\Drawables\DrawableSliderTick.cs" />
<Compile Include="Objects\Drawables\Pieces\RingPiece.cs" /> <Compile Include="Objects\Drawables\Pieces\RingPiece.cs" />

View File

@ -6,7 +6,7 @@ using osu.Framework.Extensions;
namespace osu.Game.Modes.Taiko.Judgements namespace osu.Game.Modes.Taiko.Judgements
{ {
public class TaikoJudgementInfo : JudgementInfo public class TaikoJudgement : Judgement
{ {
/// <summary> /// <summary>
/// The maximum score value. /// The maximum score value.

View File

@ -7,7 +7,7 @@ using osu.Game.Modes.Taiko.Judgements;
namespace osu.Game.Modes.Taiko.Objects.Drawable namespace osu.Game.Modes.Taiko.Objects.Drawable
{ {
public abstract class DrawableTaikoHitObject : DrawableHitObject<TaikoHitObject, TaikoJudgementInfo> public abstract class DrawableTaikoHitObject : DrawableHitObject<TaikoHitObject, TaikoJudgement>
{ {
protected DrawableTaikoHitObject(TaikoHitObject hitObject) protected DrawableTaikoHitObject(TaikoHitObject hitObject)
: base(hitObject) : base(hitObject)
@ -26,7 +26,7 @@ namespace osu.Game.Modes.Taiko.Objects.Drawable
base.LoadComplete(); base.LoadComplete();
} }
protected override TaikoJudgementInfo CreateJudgementInfo() => new TaikoJudgementInfo(); protected override TaikoJudgement CreateJudgement() => new TaikoJudgement();
/// <summary> /// <summary>
/// Sets the scroll position of the DrawableHitObject relative to the offset between /// Sets the scroll position of the DrawableHitObject relative to the offset between

View File

@ -7,18 +7,18 @@ using osu.Game.Modes.UI;
namespace osu.Game.Modes.Taiko namespace osu.Game.Modes.Taiko
{ {
internal class TaikoScoreProcessor : ScoreProcessor<TaikoHitObject, TaikoJudgementInfo> internal class TaikoScoreProcessor : ScoreProcessor<TaikoHitObject, TaikoJudgement>
{ {
public TaikoScoreProcessor() public TaikoScoreProcessor()
{ {
} }
public TaikoScoreProcessor(HitRenderer<TaikoHitObject, TaikoJudgementInfo> hitRenderer) public TaikoScoreProcessor(HitRenderer<TaikoHitObject, TaikoJudgement> hitRenderer)
: base(hitRenderer) : base(hitRenderer)
{ {
} }
protected override void UpdateCalculations(TaikoJudgementInfo newJudgement) protected override void UpdateCalculations(TaikoJudgement newJudgement)
{ {
} }
} }

View File

@ -12,13 +12,13 @@ namespace osu.Game.Modes.Taiko.UI
/// <summary> /// <summary>
/// Text that is shown as judgement when a hit object is hit or missed. /// Text that is shown as judgement when a hit object is hit or missed.
/// </summary> /// </summary>
public class DrawableTaikoJudgementInfo : DrawableJudgementInfo<TaikoJudgementInfo> public class DrawableTaikoJudgement : DrawableJudgement<TaikoJudgement>
{ {
/// <summary> /// <summary>
/// Creates a new judgement text. /// Creates a new judgement text.
/// </summary> /// </summary>
/// <param name="judgement">The judgement to visualise.</param> /// <param name="judgement">The judgement to visualise.</param>
public DrawableTaikoJudgementInfo(TaikoJudgementInfo judgement) public DrawableTaikoJudgement(TaikoJudgement judgement)
: base(judgement) : base(judgement)
{ {
} }

View File

@ -19,10 +19,10 @@ namespace osu.Game.Modes.Taiko.UI
/// </summary> /// </summary>
internal class HitExplosion : CircularContainer internal class HitExplosion : CircularContainer
{ {
private readonly TaikoJudgementInfo judgement; private readonly TaikoJudgement judgement;
private readonly Box innerFill; private readonly Box innerFill;
public HitExplosion(TaikoJudgementInfo judgement) public HitExplosion(TaikoJudgement judgement)
{ {
this.judgement = judgement; this.judgement = judgement;

View File

@ -10,7 +10,7 @@ using osu.Game.Modes.UI;
namespace osu.Game.Modes.Taiko.UI namespace osu.Game.Modes.Taiko.UI
{ {
public class TaikoHitRenderer : HitRenderer<TaikoHitObject, TaikoJudgementInfo> public class TaikoHitRenderer : HitRenderer<TaikoHitObject, TaikoJudgement>
{ {
public TaikoHitRenderer(WorkingBeatmap beatmap) public TaikoHitRenderer(WorkingBeatmap beatmap)
: base(beatmap) : base(beatmap)
@ -23,8 +23,8 @@ namespace osu.Game.Modes.Taiko.UI
protected override IBeatmapProcessor<TaikoHitObject> CreateBeatmapProcessor() => new TaikoBeatmapProcessor(); protected override IBeatmapProcessor<TaikoHitObject> CreateBeatmapProcessor() => new TaikoBeatmapProcessor();
protected override Playfield<TaikoHitObject, TaikoJudgementInfo> CreatePlayfield() => new TaikoPlayfield(); protected override Playfield<TaikoHitObject, TaikoJudgement> CreatePlayfield() => new TaikoPlayfield();
protected override DrawableHitObject<TaikoHitObject, TaikoJudgementInfo> GetVisualRepresentation(TaikoHitObject h) => null; protected override DrawableHitObject<TaikoHitObject, TaikoJudgement> GetVisualRepresentation(TaikoHitObject h) => null;
} }
} }

View File

@ -17,7 +17,7 @@ using osu.Framework.Graphics.Primitives;
namespace osu.Game.Modes.Taiko.UI namespace osu.Game.Modes.Taiko.UI
{ {
public class TaikoPlayfield : Playfield<TaikoHitObject, TaikoJudgementInfo> public class TaikoPlayfield : Playfield<TaikoHitObject, TaikoJudgement>
{ {
/// <summary> /// <summary>
/// The default play field height. /// The default play field height.
@ -48,7 +48,7 @@ namespace osu.Game.Modes.Taiko.UI
private readonly Container<HitExplosion> hitExplosionContainer; private readonly Container<HitExplosion> hitExplosionContainer;
//private Container<DrawableBarLine> barLineContainer; //private Container<DrawableBarLine> barLineContainer;
private readonly Container<DrawableTaikoJudgementInfo> judgementContainer; private readonly Container<DrawableTaikoJudgement> judgementContainer;
private readonly Container hitObjectContainer; private readonly Container hitObjectContainer;
//private Container topLevelHitContainer; //private Container topLevelHitContainer;
@ -117,7 +117,7 @@ namespace osu.Game.Modes.Taiko.UI
{ {
RelativeSizeAxes = Axes.Both, RelativeSizeAxes = Axes.Both,
}, },
judgementContainer = new Container<DrawableTaikoJudgementInfo> judgementContainer = new Container<DrawableTaikoJudgement>
{ {
RelativeSizeAxes = Axes.Both, RelativeSizeAxes = Axes.Both,
BlendingMode = BlendingMode.Additive BlendingMode = BlendingMode.Additive
@ -170,21 +170,21 @@ namespace osu.Game.Modes.Taiko.UI
rightBackground.Colour = colours.Gray0; rightBackground.Colour = colours.Gray0;
} }
public override void Add(DrawableHitObject<TaikoHitObject, TaikoJudgementInfo> h) public override void Add(DrawableHitObject<TaikoHitObject, TaikoJudgement> h)
{ {
h.Depth = (float)h.HitObject.StartTime; h.Depth = (float)h.HitObject.StartTime;
base.Add(h); base.Add(h);
} }
public override void OnJudgement(DrawableHitObject<TaikoHitObject, TaikoJudgementInfo> judgedObject) public override void OnJudgement(DrawableHitObject<TaikoHitObject, TaikoJudgement> judgedObject)
{ {
bool wasHit = judgedObject.Judgement.Result == HitResult.Hit; bool wasHit = judgedObject.Judgement.Result == HitResult.Hit;
if (wasHit) if (wasHit)
hitExplosionContainer.Add(new HitExplosion(judgedObject.Judgement)); hitExplosionContainer.Add(new HitExplosion(judgedObject.Judgement));
judgementContainer.Add(new DrawableTaikoJudgementInfo(judgedObject.Judgement) judgementContainer.Add(new DrawableTaikoJudgement(judgedObject.Judgement)
{ {
Anchor = wasHit ? Anchor.TopLeft : Anchor.CentreLeft, Anchor = wasHit ? Anchor.TopLeft : Anchor.CentreLeft,
Origin = wasHit ? Anchor.BottomCentre : Anchor.Centre, Origin = wasHit ? Anchor.BottomCentre : Anchor.Centre,

View File

@ -49,7 +49,7 @@
<ItemGroup> <ItemGroup>
<Compile Include="Beatmaps\TaikoBeatmapConverter.cs" /> <Compile Include="Beatmaps\TaikoBeatmapConverter.cs" />
<Compile Include="Beatmaps\TaikoBeatmapProcessor.cs" /> <Compile Include="Beatmaps\TaikoBeatmapProcessor.cs" />
<Compile Include="Judgements\TaikoJudgementInfo.cs" /> <Compile Include="Judgements\TaikoJudgement.cs" />
<Compile Include="Judgements\TaikoHitResult.cs" /> <Compile Include="Judgements\TaikoHitResult.cs" />
<Compile Include="Objects\Drawable\DrawableTaikoHitObject.cs" /> <Compile Include="Objects\Drawable\DrawableTaikoHitObject.cs" />
<Compile Include="Objects\Bash.cs" /> <Compile Include="Objects\Bash.cs" />
@ -62,7 +62,7 @@
<Compile Include="TaikoScoreProcessor.cs" /> <Compile Include="TaikoScoreProcessor.cs" />
<Compile Include="UI\HitTarget.cs" /> <Compile Include="UI\HitTarget.cs" />
<Compile Include="UI\InputDrum.cs" /> <Compile Include="UI\InputDrum.cs" />
<Compile Include="UI\DrawableTaikoJudgementInfo.cs" /> <Compile Include="UI\DrawableTaikoJudgement.cs" />
<Compile Include="UI\HitExplosion.cs" /> <Compile Include="UI\HitExplosion.cs" />
<Compile Include="UI\TaikoHitRenderer.cs" /> <Compile Include="UI\TaikoHitRenderer.cs" />
<Compile Include="UI\TaikoPlayfield.cs" /> <Compile Include="UI\TaikoPlayfield.cs" />

View File

@ -15,21 +15,21 @@ using osu.Game.Modes.Objects.Drawables;
namespace osu.Game.Modes.Judgements namespace osu.Game.Modes.Judgements
{ {
/// <summary> /// <summary>
/// A drawable object which visualises the hit result of a <see cref="JudgementInfo"/>. /// A drawable object which visualises the hit result of a <see cref="Judgements.Judgement"/>.
/// </summary> /// </summary>
/// <typeparam name="TJudgement">The type of judgement to visualise.</typeparam> /// <typeparam name="TJudgement">The type of judgement to visualise.</typeparam>
public class DrawableJudgementInfo<TJudgement> : Container public class DrawableJudgement<TJudgement> : Container
where TJudgement : JudgementInfo where TJudgement : Judgement
{ {
protected readonly TJudgement Judgement; protected readonly TJudgement Judgement;
protected readonly SpriteText JudgementText; protected readonly SpriteText JudgementText;
/// <summary> /// <summary>
/// Creates a drawable which visualises a <see cref="JudgementInfo"/>. /// Creates a drawable which visualises a <see cref="Judgements.Judgement"/>.
/// </summary> /// </summary>
/// <param name="judgement">The judgement to visualise.</param> /// <param name="judgement">The judgement to visualise.</param>
public DrawableJudgementInfo(TJudgement judgement) public DrawableJudgement(TJudgement judgement)
{ {
Judgement = judgement; Judgement = judgement;
@ -83,8 +83,8 @@ namespace osu.Game.Modes.Judgements
ScaleTo(0.9f); ScaleTo(0.9f);
ScaleTo(1, 500, EasingTypes.OutElastic); ScaleTo(1, 500, EasingTypes.OutElastic);
Delay(250); Delay(100);
FadeOut(250, EasingTypes.OutQuint); FadeOut(400);
break; break;
} }

View File

@ -5,7 +5,7 @@ using osu.Game.Modes.Objects.Drawables;
namespace osu.Game.Modes.Judgements namespace osu.Game.Modes.Judgements
{ {
public abstract class JudgementInfo public abstract class Judgement
{ {
/// <summary> /// <summary>
/// Whether this judgement is the result of a hit or a miss. /// Whether this judgement is the result of a hit or a miss.

View File

@ -16,7 +16,7 @@ using OpenTK.Graphics;
namespace osu.Game.Modes.Objects.Drawables namespace osu.Game.Modes.Objects.Drawables
{ {
public abstract class DrawableHitObject<TJudgement> : Container, IStateful<ArmedState> public abstract class DrawableHitObject<TJudgement> : Container, IStateful<ArmedState>
where TJudgement : JudgementInfo where TJudgement : Judgement
{ {
public override bool HandleInput => Interactive; public override bool HandleInput => Interactive;
@ -24,7 +24,7 @@ namespace osu.Game.Modes.Objects.Drawables
public TJudgement Judgement; public TJudgement Judgement;
protected abstract TJudgement CreateJudgementInfo(); protected abstract TJudgement CreateJudgement();
protected abstract void UpdateState(ArmedState state); protected abstract void UpdateState(ArmedState state);
@ -62,7 +62,7 @@ namespace osu.Game.Modes.Objects.Drawables
//we may be setting a custom judgement in test cases or what not. //we may be setting a custom judgement in test cases or what not.
if (Judgement == null) if (Judgement == null)
Judgement = CreateJudgementInfo(); Judgement = CreateJudgement();
//force application of the state that was set before we loaded. //force application of the state that was set before we loaded.
UpdateState(State); UpdateState(State);
@ -71,7 +71,7 @@ namespace osu.Game.Modes.Objects.Drawables
public abstract class DrawableHitObject<TObject, TJudgement> : DrawableHitObject<TJudgement> public abstract class DrawableHitObject<TObject, TJudgement> : DrawableHitObject<TJudgement>
where TObject : HitObject where TObject : HitObject
where TJudgement : JudgementInfo where TJudgement : Judgement
{ {
public event Action<DrawableHitObject<TObject, TJudgement>> OnJudgement; public event Action<DrawableHitObject<TObject, TJudgement>> OnJudgement;

View File

@ -105,7 +105,7 @@ namespace osu.Game.Modes
public abstract class ScoreProcessor<TObject, TJudgement> : ScoreProcessor public abstract class ScoreProcessor<TObject, TJudgement> : ScoreProcessor
where TObject : HitObject where TObject : HitObject
where TJudgement : JudgementInfo where TJudgement : Judgement
{ {
/// <summary> /// <summary>
/// All judgements held by this ScoreProcessor. /// All judgements held by this ScoreProcessor.
@ -158,7 +158,7 @@ namespace osu.Game.Modes
/// <summary> /// <summary>
/// Update any values that potentially need post-processing on a judgement change. /// Update any values that potentially need post-processing on a judgement change.
/// </summary> /// </summary>
/// <param name="newJudgement">A new JudgementInfo that triggered this calculation. May be null.</param> /// <param name="newJudgement">A new Judgement that triggered this calculation. May be null.</param>
protected abstract void UpdateCalculations(TJudgement newJudgement); protected abstract void UpdateCalculations(TJudgement newJudgement);
} }
} }

View File

@ -143,7 +143,7 @@ namespace osu.Game.Modes.UI
/// <typeparam name="TJudgement">The type of Judgement of DrawableHitObjects contained by this HitRenderer.</typeparam> /// <typeparam name="TJudgement">The type of Judgement of DrawableHitObjects contained by this HitRenderer.</typeparam>
public abstract class HitRenderer<TObject, TJudgement> : HitRenderer<TObject> public abstract class HitRenderer<TObject, TJudgement> : HitRenderer<TObject>
where TObject : HitObject where TObject : HitObject
where TJudgement : JudgementInfo where TJudgement : Judgement
{ {
public event Action<TJudgement> OnJudgement; public event Action<TJudgement> OnJudgement;

View File

@ -13,7 +13,7 @@ namespace osu.Game.Modes.UI
{ {
public abstract class Playfield<TObject, TJudgement> : Container public abstract class Playfield<TObject, TJudgement> : Container
where TObject : HitObject where TObject : HitObject
where TJudgement : JudgementInfo where TJudgement : Judgement
{ {
/// <summary> /// <summary>
/// The HitObjects contained in this Playfield. /// The HitObjects contained in this Playfield.

View File

@ -96,7 +96,7 @@
<Compile Include="IO\Legacy\SerializationReader.cs" /> <Compile Include="IO\Legacy\SerializationReader.cs" />
<Compile Include="IO\Legacy\SerializationWriter.cs" /> <Compile Include="IO\Legacy\SerializationWriter.cs" />
<Compile Include="IPC\ScoreIPCChannel.cs" /> <Compile Include="IPC\ScoreIPCChannel.cs" />
<Compile Include="Modes\Judgements\DrawableJudgementInfo.cs" /> <Compile Include="Modes\Judgements\DrawableJudgement.cs" />
<Compile Include="Modes\LegacyReplay.cs" /> <Compile Include="Modes\LegacyReplay.cs" />
<Compile Include="Modes\Mods\IApplicableMod.cs" /> <Compile Include="Modes\Mods\IApplicableMod.cs" />
<Compile Include="Modes\Mods\ModType.cs" /> <Compile Include="Modes\Mods\ModType.cs" />
@ -113,7 +113,7 @@
<Compile Include="Modes\Objects\SliderCurve.cs" /> <Compile Include="Modes\Objects\SliderCurve.cs" />
<Compile Include="Modes\Objects\Types\CurveType.cs" /> <Compile Include="Modes\Objects\Types\CurveType.cs" />
<Compile Include="Modes\Objects\Drawables\IDrawableHitObjectWithProxiedApproach.cs" /> <Compile Include="Modes\Objects\Drawables\IDrawableHitObjectWithProxiedApproach.cs" />
<Compile Include="Modes\Judgements\JudgementInfo.cs" /> <Compile Include="Modes\Judgements\Judgement.cs" />
<Compile Include="Modes\Objects\HitObjectParser.cs" /> <Compile Include="Modes\Objects\HitObjectParser.cs" />
<Compile Include="Modes\Objects\Types\IHasCombo.cs" /> <Compile Include="Modes\Objects\Types\IHasCombo.cs" />
<Compile Include="Modes\Objects\Types\IHasEndTime.cs" /> <Compile Include="Modes\Objects\Types\IHasEndTime.cs" />