Ejemplo n.º 1
0
        public LevelPreview(LevelEditor _editor)
        {
            this.Editor      = _editor;
            this.Interfacial = true;

            this.UpdateSize();

            this.Graphics.Add(this.Image = new Image(new ImageSource(1, 1)));
            this.Graphics.Add(this.Frame = new VertexArray(VertexArrayType.LinesStrip)
            {
                Color = Color.Black
            });
            this.Graphics.Add(this.Viewpoint = new VertexArray(VertexArrayType.LinesStrip)
            {
                Color = Color.White * 0.5, Z = 1
            });
            this.Frame.Add(this.FitPosition, this.FitPosition + this.FitRect.Size.OnlyX, this.FitPosition + this.FitRect.Size, this.FitPosition + this.FitRect.Size.OnlyY, this.FitPosition);
            this.Viewpoint.Add(0, new Vector(1, 0), 1, new Vector(0, 1), 0);

            Bunch <Vector> vs = new Bunch <Vector>(new Vector(4, 0), new Vector(this.Size.X - 4, 0), new Vector(this.Size.X, 4), new Vector(this.Size.X, this.Size.Y - 4), new Vector(this.Size.X - 4, this.Size.Y), new Vector(4, this.Size.Y), new Vector(0, this.Size.Y - 4), new Vector(0, 4));

            this.Graphics.Add(new VertexArray(VertexArrayType.Polygon)
            {
                Vertices = vs.Select(item => (Vertex)item)
            });
            this.Graphics.Add(new VertexArray(VertexArrayType.LinesStrip)
            {
                Vertices = vs.Select(item => (Vertex)item) + (Vertex)vs[0], Color = Color.Black
            });
        }
Ejemplo n.º 2
0
        public ScrollBackground(LevelEditor _editor)
        {
            this.Z = -10;

            this.Interfacial = true;
            this.Editor      = _editor;
            this.Preview     = _editor.LevelPreview;
        }
Ejemplo n.º 3
0
        public LevelPropertiesEditor(LevelEditor _editor, Type _levelproperties)
        {
            this.Editor          = _editor;
            this.LevelProperties = _levelproperties;

            if (_levelproperties != null)
            {
                this.Properties = PropertyReflector.GetPropertyValues(_levelproperties.GetConstructor(new Type[0]).Invoke(new object[0]));
            }
        }
Ejemplo n.º 4
0
 public EntitySelector(Bunch <EntityType> _entities, LevelEditor _editor)
 {
     this.Entities        = _entities;
     _editor.EntityEditor = this.EntityEditor = new EntityEditor();
 }
Ejemplo n.º 5
0
 public LevelInfoEditor(LevelEditor _editor)
 {
     this.Editor = _editor;
 }