mirror of
https://github.com/osukey/osukey.git
synced 2025-07-08 03:40:00 +09:00
Re-implement support for small ticks
This commit is contained in:
@ -4,6 +4,7 @@
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Pooling;
|
||||
using osu.Game.Rulesets.Judgements;
|
||||
using osu.Game.Skinning;
|
||||
|
||||
namespace osu.Game.Rulesets.Mania.UI
|
||||
@ -12,6 +13,8 @@ namespace osu.Game.Rulesets.Mania.UI
|
||||
{
|
||||
public const double DURATION = 200;
|
||||
|
||||
public JudgementResult Result { get; private set; }
|
||||
|
||||
[Resolved]
|
||||
private Column column { get; set; }
|
||||
|
||||
@ -25,18 +28,22 @@ namespace osu.Game.Rulesets.Mania.UI
|
||||
[BackgroundDependencyLoader]
|
||||
private void load()
|
||||
{
|
||||
InternalChild = skinnableExplosion = new SkinnableDrawable(new ManiaSkinComponent(ManiaSkinComponents.HitExplosion, column.Index),
|
||||
_ => new DefaultHitExplosion(column.AccentColour, false /*todo */))
|
||||
InternalChild = skinnableExplosion = new SkinnableDrawable(new ManiaSkinComponent(ManiaSkinComponents.HitExplosion, column.Index), _ => new DefaultHitExplosion())
|
||||
{
|
||||
RelativeSizeAxes = Axes.Both
|
||||
};
|
||||
}
|
||||
|
||||
public void Apply(JudgementResult result)
|
||||
{
|
||||
Result = result;
|
||||
}
|
||||
|
||||
protected override void PrepareForUse()
|
||||
{
|
||||
base.PrepareForUse();
|
||||
|
||||
(skinnableExplosion?.Drawable as IHitExplosion)?.Animate();
|
||||
(skinnableExplosion?.Drawable as IHitExplosion)?.Animate(Result);
|
||||
|
||||
this.Delay(DURATION).Then().Expire();
|
||||
}
|
||||
|
Reference in New Issue
Block a user