mirror of
https://github.com/osukey/osukey.git
synced 2025-05-07 22:57:31 +09:00
s/Ring/Hit + privatize Judgement inside RingExplosion.
This commit is contained in:
parent
00054f1573
commit
cedcab1e26
@ -15,19 +15,17 @@ using osu.Game.Modes.Taiko.Objects;
|
|||||||
namespace osu.Game.Modes.Taiko.UI
|
namespace osu.Game.Modes.Taiko.UI
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <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>
|
/// </summary>
|
||||||
internal class RingExplosion : CircularContainer
|
internal class HitExplosion : CircularContainer
|
||||||
{
|
{
|
||||||
/// <summary>
|
private TaikoJudgementInfo judgement;
|
||||||
/// The Judgement to display.
|
|
||||||
/// </summary>
|
|
||||||
public TaikoJudgementInfo Judgement;
|
|
||||||
|
|
||||||
private Box innerFill;
|
private Box innerFill;
|
||||||
|
|
||||||
public RingExplosion()
|
public HitExplosion(TaikoJudgementInfo judgement)
|
||||||
{
|
{
|
||||||
|
this.judgement = judgement;
|
||||||
|
|
||||||
Size = new Vector2(TaikoHitObject.CIRCLE_RADIUS * 2);
|
Size = new Vector2(TaikoHitObject.CIRCLE_RADIUS * 2);
|
||||||
|
|
||||||
Anchor = Anchor.Centre;
|
Anchor = Anchor.Centre;
|
||||||
@ -53,10 +51,10 @@ namespace osu.Game.Modes.Taiko.UI
|
|||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load(OsuColour colours)
|
private void load(OsuColour colours)
|
||||||
{
|
{
|
||||||
if (Judgement.SecondHit)
|
if (judgement.SecondHit)
|
||||||
Size *= 1.5f;
|
Size *= 1.5f;
|
||||||
|
|
||||||
switch (Judgement.TaikoResult)
|
switch (judgement.TaikoResult)
|
||||||
{
|
{
|
||||||
case TaikoHitResult.Good:
|
case TaikoHitResult.Good:
|
||||||
innerFill.Colour = colours.Green;
|
innerFill.Colour = colours.Green;
|
@ -46,7 +46,7 @@ namespace osu.Game.Modes.Taiko.UI
|
|||||||
|
|
||||||
protected override Container<Drawable> Content => hitObjectContainer;
|
protected override Container<Drawable> Content => hitObjectContainer;
|
||||||
|
|
||||||
private Container<RingExplosion> ringExplosionContainer;
|
private Container<HitExplosion> hitExplosionContainer;
|
||||||
//private Container<DrawableBarLine> barLineContainer;
|
//private Container<DrawableBarLine> barLineContainer;
|
||||||
private Container<JudgementText> judgementContainer;
|
private Container<JudgementText> judgementContainer;
|
||||||
|
|
||||||
@ -96,7 +96,7 @@ namespace osu.Game.Modes.Taiko.UI
|
|||||||
RelativeSizeAxes = Axes.Both,
|
RelativeSizeAxes = Axes.Both,
|
||||||
Children = new Drawable[]
|
Children = new Drawable[]
|
||||||
{
|
{
|
||||||
ringExplosionContainer = new Container<RingExplosion>
|
hitExplosionContainer = new Container<HitExplosion>
|
||||||
{
|
{
|
||||||
Anchor = Anchor.CentreLeft,
|
Anchor = Anchor.CentreLeft,
|
||||||
Origin = Anchor.Centre,
|
Origin = Anchor.Centre,
|
||||||
@ -183,10 +183,7 @@ namespace osu.Game.Modes.Taiko.UI
|
|||||||
{
|
{
|
||||||
if (judgedObject.Judgement.Result == HitResult.Hit)
|
if (judgedObject.Judgement.Result == HitResult.Hit)
|
||||||
{
|
{
|
||||||
ringExplosionContainer.Add(new RingExplosion
|
hitExplosionContainer.Add(new HitExplosion(judgedObject.Judgement));
|
||||||
{
|
|
||||||
Judgement = judgedObject.Judgement
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
float judgementOffset = judgedObject.Judgement.Result == HitResult.Hit ? judgedObject.Position.X : 0;
|
float judgementOffset = judgedObject.Judgement.Result == HitResult.Hit ? judgedObject.Position.X : 0;
|
||||||
|
@ -62,7 +62,7 @@
|
|||||||
<Compile Include="UI\HitTarget.cs" />
|
<Compile Include="UI\HitTarget.cs" />
|
||||||
<Compile Include="UI\InputDrum.cs" />
|
<Compile Include="UI\InputDrum.cs" />
|
||||||
<Compile Include="UI\JudgementText.cs" />
|
<Compile Include="UI\JudgementText.cs" />
|
||||||
<Compile Include="UI\RingExplosion.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" />
|
||||||
<Compile Include="TaikoRuleset.cs" />
|
<Compile Include="TaikoRuleset.cs" />
|
||||||
|
Loading…
x
Reference in New Issue
Block a user