Moved TotalElapsedTime from GameMain to the Timing class
This commit is contained in:
@@ -11,6 +11,8 @@ namespace Barotrauma
|
||||
{
|
||||
private static double alpha;
|
||||
|
||||
public static double TotalTime;
|
||||
|
||||
public static double Accumulator;
|
||||
public static double Step = 1.0 / 60.0;
|
||||
|
||||
@@ -30,6 +32,13 @@ namespace Barotrauma
|
||||
return current * (float)alpha + previous * (1.0f - (float)alpha);
|
||||
}
|
||||
|
||||
public static float InterpolateRotation(float previous, float current)
|
||||
{
|
||||
float angleDiff = MathUtils.GetShortestAngle(previous, current);
|
||||
|
||||
return previous + angleDiff * (float)alpha;
|
||||
}
|
||||
|
||||
public static Vector2 Interpolate(Vector2 previous, Vector2 current)
|
||||
{
|
||||
return new Vector2(
|
||||
|
||||
Reference in New Issue
Block a user