public override void Update(Window window)
{
if (window.GetKey(KeyCode.D))
{
center.X += window.deltaTime;
}
if (window.GetKey(KeyCode.A))
{
center.X -= window.deltaTime;
}
if (window.GetKey(KeyCode.W))
{
center.Y += window.deltaTime;
}
if (window.GetKey(KeyCode.S))
{
center.Y -= window.deltaTime;
}
screenMesh.v = new float[]
{
-1 + center.X, 1 + center.Y,
1+ center.X, 1 + center.Y,
1+ center.X, -1 + center.Y,
1+ center.X,-1 + center.Y,
-1+ center.X, -1 + center.Y,
-1+ center.X, 1 + center.Y
};
screenMesh.UpdateVertex();
}