Fix MathUtils.LerpVector2, add cameras.

This commit is contained in:
2023-09-25 18:32:36 +02:00
parent 34c65be667
commit 6b5678cdb8
12 changed files with 139 additions and 7 deletions

View File

@@ -0,0 +1,25 @@
using System.Numerics;
namespace DaggerFramework.SceneGraph;
public class Camera2d : Entity2d
{
public Vector2 Offset { get; set; }
public float Zoom { get; set; } = 1f;
public bool Current
{
get => _current; set
{
_current = value;
Layer?.UpdateCurrentCamera();
}
}
protected override void OnStart()
{
base.OnStart();
Offset = Renderer.WindowSize / 2;
}
private bool _current;
}