예제 #1
0
    void Start()
    {
        var tileObjectFactory            = new PrefabRenderableFactory(tilePrefab, 0);
        var blockCoreFactory             = new PrefabRenderableFactory(blockCorePrefab, 0);
        var roundCornerFactory           = new PrefabRenderableFactory(roundCornerPrefab, 0);
        var straightUpCornerFactory      = new PrefabRenderableFactory(straightUpConrerPrefab, 0);
        var straightRightCornerFactory   = new PrefabRenderableFactory(straightRightCornerPrefab, 0);
        var closedCornerFactory          = new PrefabRenderableFactory(closedCornerPrefab, 0);
        var outsideUpCornerFactory       = new PrefabRenderableFactory(outsideUpCornerPrefab, 0);
        var outsideRightCornerFactory    = new PrefabRenderableFactory(outsideRightCornerPrefab, 0);
        var diagonalMissingCornerFactory = new PrefabRenderableFactory(diagonalMissingCornerPrefab, 0);
        var roundEdgeFactory             = new PrefabRenderableFactory(roundEdgePrefab, 0);
        var closedEdgeFactory            = new PrefabRenderableFactory(closedEdgePrefab, 0);

        var blueprintBuilderFactory = new GameViewFactory();

        blueprintBuilderFactory.CreateBlueprintBuilderView(tileObjectFactory,
                                                           blockCoreFactory,
                                                           roundCornerFactory,
                                                           straightUpCornerFactory,
                                                           straightRightCornerFactory,
                                                           closedCornerFactory,
                                                           outsideUpCornerFactory,
                                                           outsideRightCornerFactory,
                                                           diagonalMissingCornerFactory,
                                                           roundEdgeFactory,
                                                           closedEdgeFactory,
                                                           new FullRectangleSection(new Geometry.Rectangle(new Geometry.Vector2(-10, -10), new Geometry.Vector2(10, 10))));
    }
예제 #2
0
    public void Start()
    {
        var tileObjectFactory           = new PrefabRenderableFactory(tilePrefab, 0);
        var blockObjectFactory          = new PrefabRenderableFactory(blockPrefab, 0);
        var shipComponentsObjectFactory = new PrefabRenderableFactory(batteryPrefab, 0);
        var pipeLinkObjectFactory       = new PrefabRenderableFactory(pipeLinkPrefab, 0);

        var blueprintBuilderFactory = new GameViewFactory();

        blueprintBuilderFactory.CreateBlueprintBuilderView(tileObjectFactory, blockObjectFactory,
                                                           shipComponentsObjectFactory, pipeLinkObjectFactory,
                                                           new FullRectangleSection(new Geometry.Rectangle(new Geometry.Vector2(-5.5, -5.5), new Geometry.Vector2(5.5, 5.5))));
    }
예제 #3
0
        private void Window_Loaded(object sender, RoutedEventArgs e)
        {
            var blueprintBuilderView = new GameViewFactory();

            blueprintBuilderView.CreateBlueprintBuilderView(
                CreateTileFactory(),
                CreateBlocksFactory(),
                CreateShipComponentFactory(),
                CreateEmptyShipComponentFactory(),
                CreatePipeLinkFactory(),
                CreatePipeFactory(),
                CreateBlockIconFactories(),
                CreateViewRectangle());
        }