1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-26 18:52:55 +08:00

s/Ring/Hit + privatize Judgement inside RingExplosion.

This commit is contained in:
smoogipooo 2017-03-23 13:02:01 +09:00
parent 00054f1573
commit cedcab1e26
3 changed files with 12 additions and 17 deletions

View File

@ -15,19 +15,17 @@ using osu.Game.Modes.Taiko.Objects;
namespace osu.Game.Modes.Taiko.UI
{
/// <summary>
/// A ring that explodes to indicate a judgement has occurred.
/// A circle explodes from the hit target to indicate a hitobject has been hit.
/// </summary>
internal class RingExplosion : CircularContainer
internal class HitExplosion : CircularContainer
{
/// <summary>
/// The Judgement to display.
/// </summary>
public TaikoJudgementInfo Judgement;
private TaikoJudgementInfo judgement;
private Box innerFill;
public RingExplosion()
public HitExplosion(TaikoJudgementInfo judgement)
{
this.judgement = judgement;
Size = new Vector2(TaikoHitObject.CIRCLE_RADIUS * 2);
Anchor = Anchor.Centre;
@ -53,10 +51,10 @@ namespace osu.Game.Modes.Taiko.UI
[BackgroundDependencyLoader]
private void load(OsuColour colours)
{
if (Judgement.SecondHit)
if (judgement.SecondHit)
Size *= 1.5f;
switch (Judgement.TaikoResult)
switch (judgement.TaikoResult)
{
case TaikoHitResult.Good:
innerFill.Colour = colours.Green;

View File

@ -46,7 +46,7 @@ namespace osu.Game.Modes.Taiko.UI
protected override Container<Drawable> Content => hitObjectContainer;
private Container<RingExplosion> ringExplosionContainer;
private Container<HitExplosion> hitExplosionContainer;
//private Container<DrawableBarLine> barLineContainer;
private Container<JudgementText> judgementContainer;
@ -96,7 +96,7 @@ namespace osu.Game.Modes.Taiko.UI
RelativeSizeAxes = Axes.Both,
Children = new Drawable[]
{
ringExplosionContainer = new Container<RingExplosion>
hitExplosionContainer = new Container<HitExplosion>
{
Anchor = Anchor.CentreLeft,
Origin = Anchor.Centre,
@ -183,10 +183,7 @@ namespace osu.Game.Modes.Taiko.UI
{
if (judgedObject.Judgement.Result == HitResult.Hit)
{
ringExplosionContainer.Add(new RingExplosion
{
Judgement = judgedObject.Judgement
});
hitExplosionContainer.Add(new HitExplosion(judgedObject.Judgement));
}
float judgementOffset = judgedObject.Judgement.Result == HitResult.Hit ? judgedObject.Position.X : 0;

View File

@ -62,7 +62,7 @@
<Compile Include="UI\HitTarget.cs" />
<Compile Include="UI\InputDrum.cs" />
<Compile Include="UI\JudgementText.cs" />
<Compile Include="UI\RingExplosion.cs" />
<Compile Include="UI\HitExplosion.cs" />
<Compile Include="UI\TaikoHitRenderer.cs" />
<Compile Include="UI\TaikoPlayfield.cs" />
<Compile Include="TaikoRuleset.cs" />