mirror of
https://github.com/osukey/osukey.git
synced 2025-08-08 00:53:56 +09:00
Set LifetimeEnd
once rather than computing on every access
This commit is contained in:
@ -24,15 +24,6 @@ namespace osu.Game.Rulesets.Osu.Skinning
|
|||||||
public IShader? TextureShader { get; private set; }
|
public IShader? TextureShader { get; private set; }
|
||||||
public IShader? RoundedTextureShader { get; private set; }
|
public IShader? RoundedTextureShader { get; private set; }
|
||||||
|
|
||||||
public override double LifetimeEnd
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
double initialFadeOutDurationTrunc = Math.Min(initial_fade_out_duration, SmokeEndTime - SmokeStartTime);
|
|
||||||
return SmokeEndTime + final_fade_out_duration + initialFadeOutDurationTrunc / re_fade_in_speed + initialFadeOutDurationTrunc / final_fade_out_speed;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private float? radius;
|
private float? radius;
|
||||||
|
|
||||||
protected float Radius
|
protected float Radius
|
||||||
@ -153,6 +144,9 @@ namespace osu.Game.Rulesets.Osu.Skinning
|
|||||||
public void FinishDrawing(double time)
|
public void FinishDrawing(double time)
|
||||||
{
|
{
|
||||||
SmokeEndTime = time;
|
SmokeEndTime = time;
|
||||||
|
|
||||||
|
double initialFadeOutDurationTrunc = Math.Min(initial_fade_out_duration, SmokeEndTime - SmokeStartTime);
|
||||||
|
LifetimeEnd = SmokeEndTime + final_fade_out_duration + initialFadeOutDurationTrunc / re_fade_in_speed + initialFadeOutDurationTrunc / final_fade_out_speed;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override DrawNode CreateDrawNode() => new SmokeDrawNode(this);
|
protected override DrawNode CreateDrawNode() => new SmokeDrawNode(this);
|
||||||
|
Reference in New Issue
Block a user