public Scene(ICamera camera, ICanvas canvas, params SceneObject[] objects)
{
if (camera == null || canvas == null) { throw new ArgumentNullException(); }
this.Canvas = canvas;
{
this.rootUI = new SceneRootUI();
}
{
var rootObject = new SceneRootObject(this);
rootObject.Children.AddRange(objects);
this.rootObject = rootObject;
}
{
var rootViewPort = new SceneRootViewPort(
AnchorStyles.Left | AnchorStyles.Right | AnchorStyles.Bottom | AnchorStyles.Top, new Padding(0, 0, 0, 0), canvas.Size);
rootViewPort.Children.Add(new ViewPort(camera,
AnchorStyles.Left | AnchorStyles.Right | AnchorStyles.Top | AnchorStyles.Bottom,
new Padding(0, 0, 0, 0), canvas.Size));
this.rootViewPort = rootViewPort;
}
//var cursor = UICursor.CreateDefault();
//cursor.Enabled = false;
//this.rootCursor.Children.Add(cursor);
//this.Cursor = cursor;
}