temporarily remove kiai flash for legacy circles

This commit is contained in:
mcendu 2019-12-22 20:01:58 +08:00
parent 76a895f348
commit 4b3cfe3bae
No known key found for this signature in database
GPG Key ID: FBCD5D45163D6364
3 changed files with 17 additions and 37 deletions

View File

@ -6,9 +6,7 @@
using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Sprites;
using osu.Framework.Graphics.Textures;
using osu.Framework.Graphics.Shapes;
using osuTK;
using osuTK.Graphics;
namespace osu.Game.Rulesets.Osu.Objects.Drawables.Pieces
{
@ -40,13 +38,7 @@ private void load(TextureStore textures)
new KiaiFlash
{
RelativeSizeAxes = Axes.Both,
Intensity = 0.25f,
Child = new Box
{
RelativeSizeAxes = Axes.Both,
Colour = Color4.White,
Alpha = 0f,
},
FlashOpacity = 0.25f,
},
new TrianglesPiece
{

View File

@ -3,30 +3,39 @@
using osu.Framework.Graphics;
using osu.Framework.Graphics.Shapes;
using osu.Game.Graphics;
using osu.Game.Graphics.Containers;
using osuTK.Graphics;
namespace osu.Game.Rulesets.Osu.Objects.Drawables.Pieces
{
public class KiaiFlash : BeatSyncedContainer
{
public float Intensity { get; set; }
public float FlashOpacity = 1f;
public KiaiFlash()
{
EarlyActivationMilliseconds = 80;
Blending = BlendingParameters.Additive;
Child = new Box
{
RelativeSizeAxes = Axes.Both,
Colour = Color4.White,
Alpha = 0f,
};
}
protected override void OnNewBeat(int beatIndex, Game.Beatmaps.ControlPoints.TimingControlPoint timingPoint, Game.Beatmaps.ControlPoints.EffectControlPoint effectPoint, Framework.Audio.Track.TrackAmplitudes amplitudes)
{
if (effectPoint.KiaiMode)
if (!effectPoint.KiaiMode)
{
Child
.FadeTo(Intensity, EarlyActivationMilliseconds, Easing.OutQuint)
.Then()
.FadeOut(timingPoint.BeatLength - 80, Easing.OutSine);
return;
}
Child
.FadeTo(FlashOpacity, EarlyActivationMilliseconds, Easing.OutQuint)
.Then()
.FadeOut(timingPoint.BeatLength - 80, Easing.OutSine);
}
}
}

View File

@ -6,12 +6,10 @@
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Sprites;
using osu.Framework.Graphics.Shapes;
using osu.Game.Graphics;
using osu.Game.Graphics.Sprites;
using osu.Game.Rulesets.Objects.Drawables;
using osu.Game.Rulesets.Osu.Objects;
using osu.Game.Rulesets.Osu.Objects.Drawables.Pieces;
using osu.Game.Skinning;
using osuTK;
using osuTK.Graphics;
@ -46,25 +44,6 @@ private void load(DrawableHitObject drawableObject, ISkinSource skin)
Anchor = Anchor.Centre,
Origin = Anchor.Centre,
},
new KiaiFlash
{
RelativeSizeAxes = Axes.Both,
Anchor = Anchor.Centre,
Origin = Anchor.Centre,
Size = new Vector2(OsuLegacySkinTransformer.LEGACY_CIRCLE_RADIUS / 64),
Masking = true,
CornerRadius = Size.X / 2,
CornerExponent = 2,
Intensity = 0.1f,
Child = new Box
{
RelativeSizeAxes = Axes.Both,
Colour = Color4.White,
Alpha = 0f,
}
},
hitCircleText = new SkinnableSpriteText(new OsuSkinComponent(OsuSkinComponents.HitCircleText), _ => new OsuSpriteText
{
Font = OsuFont.Numeric.With(size: 40),