smrendererv3/SMCode/SM.Base/Utility/Deltatime.cs
Michel Fedde 2aa12f8d25 27.09.2020
~ Moved Default-Shader to 2D to provied 2D-specific feature
~ Fixed UVs in Polygon
2020-09-27 11:58:14 +02:00

21 lines
No EOL
488 B
C#

namespace SM.Utility
{
public class Deltatime
{
public static float UpdateDelta { get; internal set; }
public static float RenderDelta { get; internal set; }
public bool UseRender;
public float Scale;
public float DeltaTime => (UseRender ? RenderDelta : UpdateDelta) * Scale;
public Deltatime(float scale = 1, bool useRender = false)
{
UseRender = useRender;
Scale = scale;
}
}
}