Update test game to showcase camera system.

This commit is contained in:
2023-09-25 18:54:17 +02:00
parent 8aab1132b6
commit 092d01dcae
4 changed files with 55 additions and 13 deletions

View File

@@ -25,6 +25,14 @@ namespace DaggerFramework
return new Vector2(x, y);
}
public static Vector2 RandomVector2(Vector2 min, Vector2 max)
{
var x = _random.NextDouble(min.X, max.X);
var y = _random.NextDouble(min.Y, max.Y);
return new Vector2((float)x, (float)y);
}
public static float EaseOutBack(float x)
{
var c1 = 1.70158f;
@@ -43,5 +51,7 @@ namespace DaggerFramework
? 1
: (float)Math.Pow(2, -10 * x) * (float)Math.Sin((x * 10 - 0.75f) * c4) + 1;
}
private static LehmerRandom _random = new();
}
}