mirror of
https://github.com/osukey/osukey.git
synced 2025-08-08 09:03:50 +09:00
Merge remote-tracking branch 'origin/master' into taiko_drumroll_tick_judgements
Conflicts: osu.Game.Modes.Taiko/osu.Game.Modes.Taiko.csproj
This commit is contained in:
@ -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);
|
||||||
|
@ -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)
|
||||||
{
|
{
|
||||||
|
@ -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)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -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;
|
||||||
|
|
@ -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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -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()
|
||||||
{
|
{
|
||||||
|
@ -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" />
|
||||||
|
@ -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;
|
||||||
|
|
@ -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)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -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)
|
||||||
{
|
{
|
||||||
|
@ -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" />
|
||||||
|
@ -44,11 +44,8 @@ namespace osu.Game.Modes.Osu.Beatmaps
|
|||||||
{
|
{
|
||||||
StartTime = original.StartTime,
|
StartTime = original.StartTime,
|
||||||
Sample = original.Sample,
|
Sample = original.Sample,
|
||||||
|
|
||||||
CurveObject = curveData,
|
CurveObject = curveData,
|
||||||
|
|
||||||
Position = positionData?.Position ?? Vector2.Zero,
|
Position = positionData?.Position ?? Vector2.Zero,
|
||||||
|
|
||||||
NewCombo = comboData?.NewCombo ?? false
|
NewCombo = comboData?.NewCombo ?? false
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
@ -60,7 +57,6 @@ namespace osu.Game.Modes.Osu.Beatmaps
|
|||||||
StartTime = original.StartTime,
|
StartTime = original.StartTime,
|
||||||
Sample = original.Sample,
|
Sample = original.Sample,
|
||||||
Position = new Vector2(512, 384) / 2,
|
Position = new Vector2(512, 384) / 2,
|
||||||
|
|
||||||
EndTime = endTimeData.EndTime
|
EndTime = endTimeData.EndTime
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
@ -69,9 +65,7 @@ namespace osu.Game.Modes.Osu.Beatmaps
|
|||||||
{
|
{
|
||||||
StartTime = original.StartTime,
|
StartTime = original.StartTime,
|
||||||
Sample = original.Sample,
|
Sample = original.Sample,
|
||||||
|
|
||||||
Position = positionData?.Position ?? Vector2.Zero,
|
Position = positionData?.Position ?? Vector2.Zero,
|
||||||
|
|
||||||
NewCombo = comboData?.NewCombo ?? false
|
NewCombo = comboData?.NewCombo ?? false
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -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.
|
@ -13,8 +13,6 @@ namespace osu.Game.Modes.Osu.Objects.Drawables
|
|||||||
{
|
{
|
||||||
public class DrawableHitCircle : DrawableOsuHitObject, IDrawableHitObjectWithProxiedApproach
|
public class DrawableHitCircle : DrawableOsuHitObject, IDrawableHitObjectWithProxiedApproach
|
||||||
{
|
{
|
||||||
private readonly OsuHitObject osuObject;
|
|
||||||
|
|
||||||
public ApproachCircle ApproachCircle;
|
public ApproachCircle ApproachCircle;
|
||||||
private readonly CirclePiece circle;
|
private readonly CirclePiece circle;
|
||||||
private readonly RingPiece ring;
|
private readonly RingPiece ring;
|
||||||
@ -27,20 +25,18 @@ namespace osu.Game.Modes.Osu.Objects.Drawables
|
|||||||
{
|
{
|
||||||
Origin = Anchor.Centre;
|
Origin = Anchor.Centre;
|
||||||
|
|
||||||
osuObject = h;
|
Position = HitObject.StackedPosition;
|
||||||
|
Scale = new Vector2(HitObject.Scale);
|
||||||
Position = osuObject.StackedPosition;
|
|
||||||
Scale = new Vector2(osuObject.Scale);
|
|
||||||
|
|
||||||
Children = new Drawable[]
|
Children = new Drawable[]
|
||||||
{
|
{
|
||||||
glow = new GlowPiece
|
glow = new GlowPiece
|
||||||
{
|
{
|
||||||
Colour = osuObject.ComboColour
|
Colour = AccentColour
|
||||||
},
|
},
|
||||||
circle = new CirclePiece
|
circle = new CirclePiece
|
||||||
{
|
{
|
||||||
Colour = osuObject.ComboColour,
|
Colour = AccentColour,
|
||||||
Hit = () =>
|
Hit = () =>
|
||||||
{
|
{
|
||||||
if (Judgement.Result.HasValue) return false;
|
if (Judgement.Result.HasValue) return false;
|
||||||
@ -58,11 +54,11 @@ namespace osu.Game.Modes.Osu.Objects.Drawables
|
|||||||
flash = new FlashPiece(),
|
flash = new FlashPiece(),
|
||||||
explode = new ExplodePiece
|
explode = new ExplodePiece
|
||||||
{
|
{
|
||||||
Colour = osuObject.ComboColour,
|
Colour = AccentColour,
|
||||||
},
|
},
|
||||||
ApproachCircle = new ApproachCircle
|
ApproachCircle = new ApproachCircle
|
||||||
{
|
{
|
||||||
Colour = osuObject.ComboColour,
|
Colour = AccentColour,
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -115,8 +111,8 @@ namespace osu.Game.Modes.Osu.Objects.Drawables
|
|||||||
|
|
||||||
ApproachCircle.FadeOut();
|
ApproachCircle.FadeOut();
|
||||||
|
|
||||||
double endTime = (osuObject as IHasEndTime)?.EndTime ?? osuObject.StartTime;
|
double endTime = (HitObject as IHasEndTime)?.EndTime ?? HitObject.StartTime;
|
||||||
double duration = endTime - osuObject.StartTime;
|
double duration = endTime - HitObject.StartTime;
|
||||||
|
|
||||||
glow.Delay(duration);
|
glow.Delay(duration);
|
||||||
glow.FadeOut(400);
|
glow.FadeOut(400);
|
||||||
|
@ -7,18 +7,19 @@ 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;
|
||||||
public const float TIME_FADEOUT = 500;
|
public const float TIME_FADEOUT = 500;
|
||||||
|
|
||||||
public DrawableOsuHitObject(OsuHitObject hitObject)
|
protected DrawableOsuHitObject(OsuHitObject hitObject)
|
||||||
: base(hitObject)
|
: base(hitObject)
|
||||||
{
|
{
|
||||||
|
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)
|
||||||
{
|
{
|
||||||
|
@ -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();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -39,6 +39,7 @@ namespace osu.Game.Modes.Osu.Objects.Drawables
|
|||||||
{
|
{
|
||||||
body = new SliderBody(s)
|
body = new SliderBody(s)
|
||||||
{
|
{
|
||||||
|
AccentColour = AccentColour,
|
||||||
Position = s.StackedPosition,
|
Position = s.StackedPosition,
|
||||||
PathWidth = s.Scale * 64,
|
PathWidth = s.Scale * 64,
|
||||||
},
|
},
|
||||||
@ -56,6 +57,7 @@ namespace osu.Game.Modes.Osu.Objects.Drawables
|
|||||||
ball = new SliderBall(s)
|
ball = new SliderBall(s)
|
||||||
{
|
{
|
||||||
Scale = new Vector2(s.Scale),
|
Scale = new Vector2(s.Scale),
|
||||||
|
AccentColour = AccentColour
|
||||||
},
|
},
|
||||||
initialCircle = new DrawableHitCircle(new HitCircle
|
initialCircle = new DrawableHitCircle(new HitCircle
|
||||||
{
|
{
|
||||||
|
@ -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)
|
||||||
{
|
{
|
||||||
@ -48,7 +48,7 @@ namespace osu.Game.Modes.Osu.Objects.Drawables
|
|||||||
new Box
|
new Box
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.Both,
|
RelativeSizeAxes = Axes.Both,
|
||||||
Colour = sliderTick.ComboColour,
|
Colour = AccentColour,
|
||||||
Alpha = 0.3f,
|
Alpha = 0.3f,
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -48,7 +48,7 @@ namespace osu.Game.Modes.Osu.Objects.Drawables
|
|||||||
Alpha = 0,
|
Alpha = 0,
|
||||||
Anchor = Anchor.Centre,
|
Anchor = Anchor.Centre,
|
||||||
Origin = Anchor.Centre,
|
Origin = Anchor.Centre,
|
||||||
DiscColour = s.ComboColour
|
DiscColour = AccentColour
|
||||||
},
|
},
|
||||||
circleContainer = new Container
|
circleContainer = new Container
|
||||||
{
|
{
|
||||||
|
@ -12,10 +12,26 @@ namespace osu.Game.Modes.Osu.Objects.Drawables.Pieces
|
|||||||
{
|
{
|
||||||
public class SliderBall : CircularContainer, ISliderProgress
|
public class SliderBall : CircularContainer, ISliderProgress
|
||||||
{
|
{
|
||||||
|
private const float width = 128;
|
||||||
|
|
||||||
|
private Color4 accentColour = Color4.Black;
|
||||||
|
/// <summary>
|
||||||
|
/// The colour that is used for the slider ball.
|
||||||
|
/// </summary>
|
||||||
|
public Color4 AccentColour
|
||||||
|
{
|
||||||
|
get { return accentColour; }
|
||||||
|
set
|
||||||
|
{
|
||||||
|
accentColour = value;
|
||||||
|
if (ball != null)
|
||||||
|
ball.Colour = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private readonly Slider slider;
|
private readonly Slider slider;
|
||||||
private readonly Box follow;
|
private readonly Box follow;
|
||||||
|
private readonly Box ball;
|
||||||
private const float width = 128;
|
|
||||||
|
|
||||||
public SliderBall(Slider slider)
|
public SliderBall(Slider slider)
|
||||||
{
|
{
|
||||||
@ -49,9 +65,9 @@ namespace osu.Game.Modes.Osu.Objects.Drawables.Pieces
|
|||||||
Alpha = 1,
|
Alpha = 1,
|
||||||
Children = new[]
|
Children = new[]
|
||||||
{
|
{
|
||||||
new Box
|
ball = new Box
|
||||||
{
|
{
|
||||||
Colour = slider.ComboColour,
|
Colour = AccentColour,
|
||||||
Alpha = 0.4f,
|
Alpha = 0.4f,
|
||||||
Width = width,
|
Width = width,
|
||||||
Height = width,
|
Height = width,
|
||||||
|
@ -13,6 +13,7 @@ using osu.Framework.Graphics.Textures;
|
|||||||
using osu.Game.Configuration;
|
using osu.Game.Configuration;
|
||||||
using OpenTK;
|
using OpenTK;
|
||||||
using OpenTK.Graphics.ES30;
|
using OpenTK.Graphics.ES30;
|
||||||
|
using OpenTK.Graphics;
|
||||||
|
|
||||||
namespace osu.Game.Modes.Osu.Objects.Drawables.Pieces
|
namespace osu.Game.Modes.Osu.Objects.Drawables.Pieces
|
||||||
{
|
{
|
||||||
@ -24,15 +25,32 @@ namespace osu.Game.Modes.Osu.Objects.Drawables.Pieces
|
|||||||
public float PathWidth
|
public float PathWidth
|
||||||
{
|
{
|
||||||
get { return path.PathWidth; }
|
get { return path.PathWidth; }
|
||||||
set
|
set { path.PathWidth = value; }
|
||||||
{
|
|
||||||
path.PathWidth = value;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public double? SnakedStart { get; private set; }
|
public double? SnakedStart { get; private set; }
|
||||||
public double? SnakedEnd { get; private set; }
|
public double? SnakedEnd { get; private set; }
|
||||||
|
|
||||||
|
private Color4 accentColour;
|
||||||
|
/// <summary>
|
||||||
|
/// Used to colour the path.
|
||||||
|
/// </summary>
|
||||||
|
public Color4 AccentColour
|
||||||
|
{
|
||||||
|
get { return accentColour; }
|
||||||
|
set
|
||||||
|
{
|
||||||
|
if (accentColour == value)
|
||||||
|
return;
|
||||||
|
accentColour = value;
|
||||||
|
|
||||||
|
if (LoadState == LoadState.Loaded)
|
||||||
|
Schedule(reloadTexture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private int textureWidth => (int)PathWidth * 2;
|
||||||
|
|
||||||
private readonly Slider slider;
|
private readonly Slider slider;
|
||||||
public SliderBody(Slider s)
|
public SliderBody(Slider s)
|
||||||
{
|
{
|
||||||
@ -82,7 +100,12 @@ namespace osu.Game.Modes.Osu.Objects.Drawables.Pieces
|
|||||||
snakingIn = config.GetBindable<bool>(OsuConfig.SnakingInSliders);
|
snakingIn = config.GetBindable<bool>(OsuConfig.SnakingInSliders);
|
||||||
snakingOut = config.GetBindable<bool>(OsuConfig.SnakingOutSliders);
|
snakingOut = config.GetBindable<bool>(OsuConfig.SnakingOutSliders);
|
||||||
|
|
||||||
int textureWidth = (int)PathWidth * 2;
|
reloadTexture();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void reloadTexture()
|
||||||
|
{
|
||||||
|
var texture = new Texture(textureWidth, 1);
|
||||||
|
|
||||||
//initialise background
|
//initialise background
|
||||||
var upload = new TextureUpload(textureWidth * 4);
|
var upload = new TextureUpload(textureWidth * 4);
|
||||||
@ -110,14 +133,13 @@ namespace osu.Game.Modes.Osu.Objects.Drawables.Pieces
|
|||||||
{
|
{
|
||||||
progress -= border_portion;
|
progress -= border_portion;
|
||||||
|
|
||||||
bytes[i * 4] = (byte)(slider.ComboColour.R * 255);
|
bytes[i * 4] = (byte)(AccentColour.R * 255);
|
||||||
bytes[i * 4 + 1] = (byte)(slider.ComboColour.G * 255);
|
bytes[i * 4 + 1] = (byte)(AccentColour.G * 255);
|
||||||
bytes[i * 4 + 2] = (byte)(slider.ComboColour.B * 255);
|
bytes[i * 4 + 2] = (byte)(AccentColour.B * 255);
|
||||||
bytes[i * 4 + 3] = (byte)((opacity_at_edge - (opacity_at_edge - opacity_at_centre) * progress / gradient_portion) * (slider.ComboColour.A * 255));
|
bytes[i * 4 + 3] = (byte)((opacity_at_edge - (opacity_at_edge - opacity_at_centre) * progress / gradient_portion) * (AccentColour.A * 255));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var texture = new Texture(textureWidth, 1);
|
|
||||||
texture.SetData(upload);
|
texture.SetData(upload);
|
||||||
path.Texture = texture;
|
path.Texture = texture;
|
||||||
}
|
}
|
||||||
|
@ -36,7 +36,7 @@ namespace osu.Game.Modes.Osu.Objects
|
|||||||
|
|
||||||
public float Scale { get; set; } = 1;
|
public float Scale { get; set; } = 1;
|
||||||
|
|
||||||
public Color4 ComboColour { get; set; }
|
public Color4 ComboColour { get; set; } = Color4.Gray;
|
||||||
public virtual bool NewCombo { get; set; }
|
public virtual bool NewCombo { get; set; }
|
||||||
public int ComboIndex { get; set; }
|
public int ComboIndex { get; set; }
|
||||||
|
|
||||||
|
@ -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;
|
||||||
}
|
}
|
||||||
|
@ -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)
|
||||||
|
@ -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
|
||||||
|
@ -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" />
|
||||||
|
@ -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.
|
@ -1,39 +0,0 @@
|
|||||||
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
|
|
||||||
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
|
||||||
|
|
||||||
using osu.Framework.Allocation;
|
|
||||||
using osu.Framework.Graphics;
|
|
||||||
using osu.Framework.Graphics.Sprites;
|
|
||||||
using osu.Framework.Graphics.Textures;
|
|
||||||
using osu.Framework.Graphics.Transforms;
|
|
||||||
using OpenTK;
|
|
||||||
|
|
||||||
namespace osu.Game.Modes.Taiko.Objects.Drawable
|
|
||||||
{
|
|
||||||
internal class DrawableTaikoHit : Sprite
|
|
||||||
{
|
|
||||||
private readonly TaikoHitObject h;
|
|
||||||
|
|
||||||
public DrawableTaikoHit(TaikoHitObject h)
|
|
||||||
{
|
|
||||||
this.h = h;
|
|
||||||
|
|
||||||
Origin = Anchor.Centre;
|
|
||||||
Scale = new Vector2(0.2f);
|
|
||||||
RelativePositionAxes = Axes.Both;
|
|
||||||
Position = new Vector2(1.1f, 0.5f);
|
|
||||||
}
|
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
|
||||||
private void load(TextureStore textures)
|
|
||||||
{
|
|
||||||
Texture = textures.Get(@"Menu/logo");
|
|
||||||
|
|
||||||
const double duration = 0;
|
|
||||||
|
|
||||||
Transforms.Add(new TransformPositionX { StartTime = h.StartTime - 200, EndTime = h.StartTime, StartValue = 1.1f, EndValue = 0.1f });
|
|
||||||
Transforms.Add(new TransformAlpha { StartTime = h.StartTime + duration + 200, EndTime = h.StartTime + duration + 400, StartValue = 1, EndValue = 0 });
|
|
||||||
Expire(true);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -0,0 +1,46 @@
|
|||||||
|
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
|
||||||
|
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||||
|
|
||||||
|
using osu.Framework.Graphics;
|
||||||
|
using osu.Game.Modes.Objects.Drawables;
|
||||||
|
using osu.Game.Modes.Taiko.Judgements;
|
||||||
|
|
||||||
|
namespace osu.Game.Modes.Taiko.Objects.Drawable
|
||||||
|
{
|
||||||
|
public abstract class DrawableTaikoHitObject : DrawableHitObject<TaikoHitObject, TaikoJudgement>
|
||||||
|
{
|
||||||
|
protected DrawableTaikoHitObject(TaikoHitObject hitObject)
|
||||||
|
: base(hitObject)
|
||||||
|
{
|
||||||
|
Anchor = Anchor.CentreLeft;
|
||||||
|
Origin = Anchor.Centre;
|
||||||
|
|
||||||
|
RelativePositionAxes = Axes.X;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override void LoadComplete()
|
||||||
|
{
|
||||||
|
LifetimeStart = HitObject.StartTime - HitObject.PreEmpt * 2;
|
||||||
|
LifetimeEnd = HitObject.StartTime + HitObject.PreEmpt;
|
||||||
|
|
||||||
|
base.LoadComplete();
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override TaikoJudgement CreateJudgement() => new TaikoJudgement();
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Sets the scroll position of the DrawableHitObject relative to the offset between
|
||||||
|
/// a time value and the HitObject's StartTime.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="time"></param>
|
||||||
|
protected virtual void UpdateScrollPosition(double time)
|
||||||
|
{
|
||||||
|
MoveToX((float)((HitObject.StartTime - time) / HitObject.PreEmpt));
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override void Update()
|
||||||
|
{
|
||||||
|
UpdateScrollPosition(Time.Current);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -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)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -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)
|
||||||
{
|
{
|
||||||
}
|
}
|
@ -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;
|
||||||
|
|
||||||
|
@ -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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -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,
|
||||||
|
@ -50,20 +50,20 @@
|
|||||||
<Compile Include="Beatmaps\TaikoBeatmapConverter.cs" />
|
<Compile Include="Beatmaps\TaikoBeatmapConverter.cs" />
|
||||||
<Compile Include="Beatmaps\TaikoBeatmapProcessor.cs" />
|
<Compile Include="Beatmaps\TaikoBeatmapProcessor.cs" />
|
||||||
<Compile Include="Judgements\TaikoDrumRollTickJudgementInfo.cs" />
|
<Compile Include="Judgements\TaikoDrumRollTickJudgementInfo.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\Bash.cs" />
|
<Compile Include="Objects\Bash.cs" />
|
||||||
<Compile Include="Objects\DrumRoll.cs" />
|
<Compile Include="Objects\DrumRoll.cs" />
|
||||||
<Compile Include="Objects\DrumRollTick.cs" />
|
<Compile Include="Objects\DrumRollTick.cs" />
|
||||||
<Compile Include="Objects\Hit.cs" />
|
<Compile Include="Objects\Hit.cs" />
|
||||||
<Compile Include="TaikoDifficultyCalculator.cs" />
|
<Compile Include="TaikoDifficultyCalculator.cs" />
|
||||||
<Compile Include="Objects\Drawable\DrawableTaikoHit.cs" />
|
|
||||||
<Compile Include="Objects\TaikoHitObject.cs" />
|
<Compile Include="Objects\TaikoHitObject.cs" />
|
||||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||||
<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" />
|
||||||
|
@ -70,7 +70,7 @@ namespace osu.Game.Tests.Beatmaps.IO
|
|||||||
Assert.IsTrue(File.Exists(temp));
|
Assert.IsTrue(File.Exists(temp));
|
||||||
|
|
||||||
var importer = new BeatmapIPCChannel(client);
|
var importer = new BeatmapIPCChannel(client);
|
||||||
if (!importer.ImportAsync(temp).Wait(1000))
|
if (!importer.ImportAsync(temp).Wait(5000))
|
||||||
Assert.Fail(@"IPC took too long to send");
|
Assert.Fail(@"IPC took too long to send");
|
||||||
|
|
||||||
ensureLoaded(osu);
|
ensureLoaded(osu);
|
||||||
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
@ -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.
|
@ -11,11 +11,12 @@ using osu.Game.Beatmaps.Samples;
|
|||||||
using osu.Game.Modes.Judgements;
|
using osu.Game.Modes.Judgements;
|
||||||
using Container = osu.Framework.Graphics.Containers.Container;
|
using Container = osu.Framework.Graphics.Containers.Container;
|
||||||
using osu.Game.Modes.Objects.Types;
|
using osu.Game.Modes.Objects.Types;
|
||||||
|
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;
|
||||||
|
|
||||||
@ -23,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);
|
||||||
|
|
||||||
@ -61,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);
|
||||||
@ -70,12 +71,17 @@ 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;
|
||||||
|
|
||||||
public TObject HitObject;
|
public TObject HitObject;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The colour used for various elements of this DrawableHitObject.
|
||||||
|
/// </summary>
|
||||||
|
public Color4 AccentColour { get; protected set; }
|
||||||
|
|
||||||
protected DrawableHitObject(TObject hitObject)
|
protected DrawableHitObject(TObject hitObject)
|
||||||
{
|
{
|
||||||
HitObject = hitObject;
|
HitObject = hitObject;
|
||||||
|
@ -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);
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -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;
|
||||||
|
|
||||||
|
@ -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.
|
||||||
|
@ -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" />
|
||||||
|
Reference in New Issue
Block a user