Exemplo n.º 1
0
    public void RemoveModel(Model model)
    {
        EditLayer layer = this.CurrentLayer;

        this.AddCommand(new Command(
                            () => {
            layer.RemoveModel(model, true);
        }, () => {
            layer.AddModel(model);
        }));
    }
Exemplo n.º 2
0
    public void AddModel(Vector3 position, int rotation)
    {
        EditLayer layer      = this.CurrentLayer;
        var       modelShape = ModelShape.Find(this.toolModel);
        var       model      = new Model(modelShape, position, rotation);

        this.AddCommand(new Command(
                            () => {
            layer.AddModel(model);
        }, () => {
            layer.RemoveModel(model, true);
        }));
    }