mirror of
https://github.com/ppy/osu.git
synced 2025-01-13 17:13:06 +08:00
Add osu! hit object dim
Stable would dim objects when they can't be hit (ie. the "miss" window is not active yet). This was never implemented in lazer, and causes quite large visual differences. No one has mentioned this yet, but it will definitely be one of those missing pieces which makes lazer feel different to stable.
This commit is contained in:
parent
c44e99d6c4
commit
c2956c6e1e
@ -11,7 +11,9 @@ using osu.Framework.Graphics.Primitives;
|
|||||||
using osu.Game.Rulesets.Judgements;
|
using osu.Game.Rulesets.Judgements;
|
||||||
using osu.Game.Rulesets.Objects.Drawables;
|
using osu.Game.Rulesets.Objects.Drawables;
|
||||||
using osu.Game.Rulesets.Osu.Judgements;
|
using osu.Game.Rulesets.Osu.Judgements;
|
||||||
|
using osu.Game.Rulesets.Scoring;
|
||||||
using osuTK;
|
using osuTK;
|
||||||
|
using osuTK.Graphics;
|
||||||
|
|
||||||
namespace osu.Game.Rulesets.Osu.Objects.Drawables
|
namespace osu.Game.Rulesets.Osu.Objects.Drawables
|
||||||
{
|
{
|
||||||
@ -64,6 +66,21 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables
|
|||||||
ScaleBindable.UnbindFrom(HitObject.ScaleBindable);
|
ScaleBindable.UnbindFrom(HitObject.ScaleBindable);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected override void UpdateInitialTransforms()
|
||||||
|
{
|
||||||
|
base.UpdateInitialTransforms();
|
||||||
|
|
||||||
|
double missWindow = HitObject.HitWindows.WindowFor(HitResult.Miss);
|
||||||
|
|
||||||
|
// Of note, no one noticed this was missing for years, but it definitely feels like it should still exist.
|
||||||
|
// For now this is applied across all skins, and matches stable.
|
||||||
|
// For simplicity, dim colour is applied to the DrawableHitObject itself.
|
||||||
|
// We may need to make a nested container setup if this even causes a usage conflict (ie. with a mod).
|
||||||
|
this.FadeColour(new Color4(195, 195, 195, 255));
|
||||||
|
using (BeginDelayedSequence(InitialLifetimeOffset - missWindow))
|
||||||
|
this.FadeColour(Color4.White, 100);
|
||||||
|
}
|
||||||
|
|
||||||
protected sealed override double InitialLifetimeOffset => HitObject.TimePreempt;
|
protected sealed override double InitialLifetimeOffset => HitObject.TimePreempt;
|
||||||
|
|
||||||
private OsuInputManager osuActionInputManager;
|
private OsuInputManager osuActionInputManager;
|
||||||
|
Loading…
Reference in New Issue
Block a user