mirror of
https://github.com/osukey/osukey.git
synced 2025-07-01 08:20:00 +09:00
Better updateGlow methods.
This commit is contained in:
@ -43,7 +43,7 @@ namespace osu.Game.Rulesets.Mania.Objects.Drawables
|
||||
{
|
||||
base.LoadComplete();
|
||||
|
||||
UpdateGlow();
|
||||
updateGlow();
|
||||
}
|
||||
|
||||
public override Color4 AccentColour
|
||||
@ -57,10 +57,27 @@ namespace osu.Game.Rulesets.Mania.Objects.Drawables
|
||||
|
||||
headPiece.AccentColour = value;
|
||||
|
||||
UpdateGlow();
|
||||
updateGlow();
|
||||
}
|
||||
}
|
||||
|
||||
private void updateGlow()
|
||||
{
|
||||
if (!IsLoaded)
|
||||
return;
|
||||
|
||||
if (!HasOwnGlow)
|
||||
return;
|
||||
|
||||
EdgeEffect = new EdgeEffectParameters
|
||||
{
|
||||
Type = EdgeEffectType.Glow,
|
||||
Colour = AccentColour.Opacity(0.5f),
|
||||
Radius = 10,
|
||||
Hollow = true
|
||||
};
|
||||
}
|
||||
|
||||
protected override void CheckJudgement(bool userTriggered)
|
||||
{
|
||||
if (!userTriggered)
|
||||
@ -96,23 +113,6 @@ namespace osu.Game.Rulesets.Mania.Objects.Drawables
|
||||
}
|
||||
}
|
||||
|
||||
protected virtual void UpdateGlow()
|
||||
{
|
||||
if (!IsLoaded)
|
||||
return;
|
||||
|
||||
if (!HasOwnGlow)
|
||||
return;
|
||||
|
||||
EdgeEffect = new EdgeEffectParameters
|
||||
{
|
||||
Type = EdgeEffectType.Glow,
|
||||
Colour = AccentColour.Opacity(0.5f),
|
||||
Radius = 10,
|
||||
Hollow = true
|
||||
};
|
||||
}
|
||||
|
||||
public virtual bool OnPressed(ManiaAction action)
|
||||
{
|
||||
if (action != Action)
|
||||
|
Reference in New Issue
Block a user