mirror of
https://github.com/ppy/osu.git
synced 2025-01-15 15:53:21 +08:00
move auto fade in to mod
This commit is contained in:
parent
10a1948720
commit
9aa5db88d4
@ -3,12 +3,12 @@
|
|||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using osu.Framework.Graphics;
|
||||||
using osu.Framework.Graphics.Sprites;
|
using osu.Framework.Graphics.Sprites;
|
||||||
using osu.Game.Graphics;
|
using osu.Game.Graphics;
|
||||||
using osu.Game.Rulesets.Mods;
|
using osu.Game.Rulesets.Mods;
|
||||||
using osu.Game.Rulesets.Objects.Drawables;
|
using osu.Game.Rulesets.Objects.Drawables;
|
||||||
using osu.Game.Rulesets.Osu.Objects.Drawables;
|
using osu.Game.Rulesets.Osu.Objects.Drawables;
|
||||||
using osu.Game.Rulesets.Osu.Objects.Drawables.Pieces;
|
|
||||||
|
|
||||||
namespace osu.Game.Rulesets.Osu.Mods
|
namespace osu.Game.Rulesets.Osu.Mods
|
||||||
{
|
{
|
||||||
@ -30,10 +30,15 @@ namespace osu.Game.Rulesets.Osu.Mods
|
|||||||
if (hitObject is DrawableSpinner spinner)
|
if (hitObject is DrawableSpinner spinner)
|
||||||
{
|
{
|
||||||
spinner.Disc.Enabled = false;
|
spinner.Disc.Enabled = false;
|
||||||
spinner.Disc.OnUpdate += d =>
|
spinner.OnUpdate += d =>
|
||||||
{
|
{
|
||||||
if (d is SpinnerDisc s && s.Valid)
|
if (d is DrawableSpinner s)
|
||||||
s.Rotate(180 / MathF.PI * (float)s.Clock.ElapsedFrameTime / 40);
|
{
|
||||||
|
if (s.Disc.Valid)
|
||||||
|
s.Disc.Rotate(180 / MathF.PI * (float)s.Clock.ElapsedFrameTime / 40);
|
||||||
|
if (!s.SpmCounter.IsPresent)
|
||||||
|
s.SpmCounter.FadeIn(s.HitObject.TimeFadeIn);
|
||||||
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -177,7 +177,7 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables
|
|||||||
protected override void Update()
|
protected override void Update()
|
||||||
{
|
{
|
||||||
Disc.Tracking = OsuActionInputManager?.PressedActions.Any(x => x == OsuAction.LeftButton || x == OsuAction.RightButton) ?? false;
|
Disc.Tracking = OsuActionInputManager?.PressedActions.Any(x => x == OsuAction.LeftButton || x == OsuAction.RightButton) ?? false;
|
||||||
if (!SpmCounter.IsPresent && (Disc.Tracking || !Disc.Enabled))
|
if (!SpmCounter.IsPresent && Disc.Tracking)
|
||||||
SpmCounter.FadeIn(HitObject.TimeFadeIn);
|
SpmCounter.FadeIn(HitObject.TimeFadeIn);
|
||||||
|
|
||||||
base.Update();
|
base.Update();
|
||||||
|
Loading…
Reference in New Issue
Block a user