2018-01-05 19:21:19 +08:00
|
|
|
// Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>.
|
2017-05-24 13:53:28 +08:00
|
|
|
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
|
|
|
|
|
|
|
using OpenTK;
|
|
|
|
using osu.Framework.Allocation;
|
|
|
|
using osu.Framework.Graphics;
|
|
|
|
using osu.Framework.Graphics.Containers;
|
2017-06-20 13:54:23 +08:00
|
|
|
using osu.Framework.Graphics.Shapes;
|
2017-05-24 13:53:28 +08:00
|
|
|
using osu.Game.Graphics;
|
2017-09-06 16:02:13 +08:00
|
|
|
using osu.Game.Rulesets.Objects.Drawables;
|
2017-05-24 13:53:28 +08:00
|
|
|
using osu.Game.Rulesets.Taiko.Objects;
|
|
|
|
|
|
|
|
namespace osu.Game.Rulesets.Taiko.UI
|
|
|
|
{
|
|
|
|
public class KiaiHitExplosion : CircularContainer
|
|
|
|
{
|
2017-09-06 16:02:13 +08:00
|
|
|
public readonly DrawableHitObject JudgedObject;
|
2017-05-24 13:53:28 +08:00
|
|
|
|
|
|
|
private readonly bool isRim;
|
|
|
|
|
2017-09-06 16:02:13 +08:00
|
|
|
public KiaiHitExplosion(DrawableHitObject judgedObject, bool isRim)
|
2017-05-24 13:53:28 +08:00
|
|
|
{
|
|
|
|
this.isRim = isRim;
|
|
|
|
|
2017-09-06 16:02:13 +08:00
|
|
|
JudgedObject = judgedObject;
|
2017-05-24 13:53:28 +08:00
|
|
|
|
2017-08-03 12:06:15 +08:00
|
|
|
Anchor = Anchor.CentreLeft;
|
2017-05-24 13:53:28 +08:00
|
|
|
Origin = Anchor.Centre;
|
|
|
|
|
2017-08-03 12:06:15 +08:00
|
|
|
RelativeSizeAxes = Axes.Both;
|
|
|
|
Size = new Vector2(TaikoHitObject.DEFAULT_SIZE, 1);
|
2017-05-24 13:53:28 +08:00
|
|
|
|
|
|
|
Masking = true;
|
2017-05-24 14:48:27 +08:00
|
|
|
Alpha = 0.25f;
|
2017-05-24 13:53:28 +08:00
|
|
|
|
|
|
|
Children = new[]
|
|
|
|
{
|
|
|
|
new Box
|
|
|
|
{
|
|
|
|
RelativeSizeAxes = Axes.Both,
|
|
|
|
Alpha = 0,
|
|
|
|
AlwaysPresent = true
|
|
|
|
}
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
[BackgroundDependencyLoader]
|
|
|
|
private void load(OsuColour colours)
|
|
|
|
{
|
2017-06-12 11:48:47 +08:00
|
|
|
EdgeEffect = new EdgeEffectParameters
|
2017-05-24 13:53:28 +08:00
|
|
|
{
|
|
|
|
Type = EdgeEffectType.Glow,
|
|
|
|
Colour = isRim ? colours.BlueDarker : colours.PinkDarker,
|
|
|
|
Radius = 60,
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
protected override void LoadComplete()
|
|
|
|
{
|
|
|
|
base.LoadComplete();
|
|
|
|
|
2017-07-23 02:50:25 +08:00
|
|
|
this.ScaleTo(new Vector2(1, 3f), 500, Easing.OutQuint);
|
2017-07-15 00:18:12 +08:00
|
|
|
this.FadeOut(250);
|
2017-05-24 13:53:28 +08:00
|
|
|
|
|
|
|
Expire();
|
|
|
|
}
|
|
|
|
}
|
2018-01-05 19:21:19 +08:00
|
|
|
}
|