mirror of
https://github.com/ppy/osu.git
synced 2025-01-15 02:46:43 +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.Collections.Generic;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Sprites;
|
||||
using osu.Game.Graphics;
|
||||
using osu.Game.Rulesets.Mods;
|
||||
using osu.Game.Rulesets.Objects.Drawables;
|
||||
using osu.Game.Rulesets.Osu.Objects.Drawables;
|
||||
using osu.Game.Rulesets.Osu.Objects.Drawables.Pieces;
|
||||
|
||||
namespace osu.Game.Rulesets.Osu.Mods
|
||||
{
|
||||
@ -30,10 +30,15 @@ namespace osu.Game.Rulesets.Osu.Mods
|
||||
if (hitObject is DrawableSpinner spinner)
|
||||
{
|
||||
spinner.Disc.Enabled = false;
|
||||
spinner.Disc.OnUpdate += d =>
|
||||
spinner.OnUpdate += d =>
|
||||
{
|
||||
if (d is SpinnerDisc s && s.Valid)
|
||||
s.Rotate(180 / MathF.PI * (float)s.Clock.ElapsedFrameTime / 40);
|
||||
if (d is DrawableSpinner s)
|
||||
{
|
||||
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()
|
||||
{
|
||||
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);
|
||||
|
||||
base.Update();
|
||||
|
Loading…
Reference in New Issue
Block a user