2019-01-24 08:43:03 +00:00
|
|
|
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
|
|
|
// See the LICENCE file in the repository root for full licence text.
|
2018-04-13 09:19:50 +00:00
|
|
|
|
2017-05-24 05:53:28 +00:00
|
|
|
using osu.Framework.Allocation;
|
|
|
|
using osu.Framework.Graphics;
|
|
|
|
using osu.Framework.Graphics.Containers;
|
2019-04-02 05:51:28 +00:00
|
|
|
using osu.Framework.Graphics.Effects;
|
2017-06-20 05:54:23 +00:00
|
|
|
using osu.Framework.Graphics.Shapes;
|
2017-05-24 05:53:28 +00:00
|
|
|
using osu.Game.Graphics;
|
|
|
|
using osu.Game.Rulesets.Taiko.Objects;
|
2022-11-02 08:04:45 +00:00
|
|
|
using osuTK;
|
2018-04-13 09:19:50 +00:00
|
|
|
|
2022-11-02 08:04:45 +00:00
|
|
|
namespace osu.Game.Rulesets.Taiko.Skinning.Default
|
2017-05-24 05:53:28 +00:00
|
|
|
{
|
2020-11-10 12:24:32 +00:00
|
|
|
public partial class DefaultKiaiHitExplosion : CircularContainer
|
2017-05-24 05:53:28 +00:00
|
|
|
{
|
2018-06-11 11:42:04 +00:00
|
|
|
public override bool RemoveWhenNotAlive => true;
|
|
|
|
|
2020-04-27 03:23:53 +00:00
|
|
|
private readonly HitType type;
|
2018-04-13 09:19:50 +00:00
|
|
|
|
2020-11-10 12:35:49 +00:00
|
|
|
public DefaultKiaiHitExplosion(HitType type)
|
2017-05-24 05:53:28 +00:00
|
|
|
{
|
2020-04-27 03:23:53 +00:00
|
|
|
this.type = type;
|
2018-04-13 09:19:50 +00:00
|
|
|
|
2017-08-03 04:06:15 +00:00
|
|
|
RelativeSizeAxes = Axes.Both;
|
2018-04-13 09:19:50 +00:00
|
|
|
|
2020-04-30 00:41:56 +00:00
|
|
|
Blending = BlendingParameters.Additive;
|
|
|
|
|
2017-05-24 05:53:28 +00:00
|
|
|
Masking = true;
|
2017-05-24 06:48:27 +00:00
|
|
|
Alpha = 0.25f;
|
2018-04-13 09:19:50 +00:00
|
|
|
|
2017-05-24 05:53:28 +00:00
|
|
|
Children = new[]
|
|
|
|
{
|
|
|
|
new Box
|
|
|
|
{
|
|
|
|
RelativeSizeAxes = Axes.Both,
|
|
|
|
Alpha = 0,
|
|
|
|
AlwaysPresent = true
|
|
|
|
}
|
|
|
|
};
|
|
|
|
}
|
2018-04-13 09:19:50 +00:00
|
|
|
|
2017-05-24 05:53:28 +00:00
|
|
|
[BackgroundDependencyLoader]
|
|
|
|
private void load(OsuColour colours)
|
|
|
|
{
|
2017-06-12 03:48:47 +00:00
|
|
|
EdgeEffect = new EdgeEffectParameters
|
2017-05-24 05:53:28 +00:00
|
|
|
{
|
|
|
|
Type = EdgeEffectType.Glow,
|
2020-04-27 03:23:53 +00:00
|
|
|
Colour = type == HitType.Rim ? colours.BlueDarker : colours.PinkDarker,
|
2017-05-24 05:53:28 +00:00
|
|
|
Radius = 60,
|
|
|
|
};
|
|
|
|
}
|
2018-04-13 09:19:50 +00:00
|
|
|
|
2017-05-24 05:53:28 +00:00
|
|
|
protected override void LoadComplete()
|
|
|
|
{
|
|
|
|
base.LoadComplete();
|
2018-04-13 09:19:50 +00:00
|
|
|
|
2017-07-22 18:50:25 +00:00
|
|
|
this.ScaleTo(new Vector2(1, 3f), 500, Easing.OutQuint);
|
2017-07-14 16:18:12 +00:00
|
|
|
this.FadeOut(250);
|
2018-04-13 09:19:50 +00:00
|
|
|
|
2018-06-11 11:42:04 +00:00
|
|
|
Expire(true);
|
2017-05-24 05:53:28 +00:00
|
|
|
}
|
|
|
|
}
|
2018-01-05 11:21:19 +00:00
|
|
|
}
|