33 lines
869 B
C#
33 lines
869 B
C#
using System.Numerics;
|
|
|
|
namespace SlatedGameToolkit.Framework.Graphics
|
|
{
|
|
public class Camera2D : Camera {
|
|
public new Vector2 Position {
|
|
get {
|
|
return new Vector2(base.Position.X, base.Position.Y);
|
|
}
|
|
|
|
set {
|
|
base.Position = new Vector3(value, base.Position.Z);
|
|
}
|
|
}
|
|
|
|
public new Vector2 MoveTo {
|
|
get {
|
|
return new Vector2(base.MoveTo.X, base.MoveTo.Y);
|
|
}
|
|
|
|
set {
|
|
base.MoveTo = new Vector3(value, base.MoveTo.Z);
|
|
}
|
|
}
|
|
|
|
public Camera2D(float width, float height) : base(width, height) {
|
|
this.Orthographic = true;
|
|
this.LockedOrientation = true;
|
|
this.CameraFront = -Vector3.UnitZ;
|
|
base.Position = Vector3.UnitZ;
|
|
}
|
|
}
|
|
} |