Ejemplo n.º 1
0
        public EditBlueprintScrapShape(BlueprintView view, BlueprintScrap scrap)
        {
            _view = view;
            //_textureCenter = new Vector2(_texture.Width, _texture.Height) / 2;
            _scrap  = scrap;
            _points = new List <Vector2>(_scrap.points);

            InitializeComponent();

            // Set scrap texture
            editBlueprintScrapShapeGraphics.setTexture(scrap.scrapTextureUID);
        }
Ejemplo n.º 2
0
        public BlueprintController(EditorController controller, BlueprintView blueprintView)
            : base()
        {
            _editorController = controller;
            _blueprints       = new BindingList <EditorBlueprint>();
            _view             = blueprintView;
            _view.setController(this);

            // Load blueprints
            ResourceManager.loadAllBlueprints(new FileStream(ResourceManager.blueprintPath, FileMode.Open));
            List <XElement> blueprintResources = ResourceManager.blueprintResources;

            foreach (XElement data in blueprintResources)
            {
                _blueprints.Add(initializeBlueprint(data));
            }
        }