mirror of
https://github.com/ppy/osu.git
synced 2025-01-13 14:52:57 +08:00
Scale smoke radius based on texture width
This commit is contained in:
parent
3eb28881e4
commit
8204090e47
@ -65,7 +65,6 @@ namespace osu.Game.Rulesets.Osu.Skinning.Legacy
|
||||
public LegacySmoke(ISkin skin)
|
||||
{
|
||||
this.skin = skin;
|
||||
Radius = 3;
|
||||
}
|
||||
|
||||
protected override void LoadComplete()
|
||||
@ -164,12 +163,10 @@ namespace osu.Game.Rulesets.Osu.Skinning.Legacy
|
||||
fraction = 1 - MathF.Pow(1 - fraction, 5);
|
||||
float angle = fraction * (finalAngle - initialAngle) + initialAngle;
|
||||
|
||||
return toVector2(angle);
|
||||
return new Vector2(MathF.Sin(angle), -MathF.Cos(angle));
|
||||
}
|
||||
|
||||
private float nextRotation() => max_rotation * ((float)rotationRNG.NextDouble() * 2 - 1);
|
||||
|
||||
private Vector2 toVector2(float angle) => new Vector2(MathF.Sin(angle), -MathF.Cos(angle));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -26,11 +26,11 @@ namespace osu.Game.Rulesets.Osu.Skinning
|
||||
public IShader? TextureShader { get; private set; }
|
||||
public IShader? RoundedTextureShader { get; private set; }
|
||||
|
||||
private float radius = 1;
|
||||
private float? radius;
|
||||
|
||||
protected float Radius
|
||||
{
|
||||
get => radius;
|
||||
get => radius ?? Texture?.DisplayWidth * 0.165f ?? 3;
|
||||
set
|
||||
{
|
||||
if (radius == value)
|
||||
|
Loading…
Reference in New Issue
Block a user