Ejemplo n.º 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))));
    }
Ejemplo n.º 2
0
 internal void Show()
 {
     if (_target == null)
     {
         _target = GameViewFactory.getInstance(this, _user, _numBot, _diff);
     }
     OnGameStart();
     _target.ShowForm();
 }
Ejemplo n.º 3
0
        private void StartNewGameInView(Game game, Player player, AutoResetEvent block)
        {
            Logger.LogInfo("Starting new game in view.");
            Form newGameForm = GameViewFactory.GetGameViewAsForm(game, player);

            newGameForm.FormClosed += new FormClosedEventHandler((sender, args) =>
            {
                block.Set();
            });

            Application.Run(newGameForm);
        }
Ejemplo n.º 4
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))));
    }
Ejemplo n.º 5
0
        private void Window_Loaded(object sender, RoutedEventArgs e)
        {
            var blueprintBuilderView = new GameViewFactory();

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