Beispiel #1
0
    public void WaterDrawTest()
    {
        var visualizer = new ElementVisualizaer();

        visualizer.Add(new BlockFactory().GetWater(40, 40));
        visualizer.Start();
    }
Beispiel #2
0
    public void StaticComponentsDisplay()
    {
        var blockFactory = new BlockFactory();
        var visualizer   = new ElementVisualizaer();

        visualizer.Add(blockFactory.GetStone(0, 0));
        visualizer.Add(blockFactory.GetStairs(20, 0));
        visualizer.Add(blockFactory.GetGold(40, 0));
        visualizer.Add(blockFactory.GetRail(60, 0));
        visualizer.Add(blockFactory.GetGameOver(0, 40));

        visualizer.Start();
    }
Beispiel #3
0
    public void BrickDrawManualTest()
    {
        var blockFactory = new BlockFactory();
        var visualizer   = new ElementVisualizaer();

        var brick = blockFactory.GetBrick(0, 20);

        visualizer.Add(brick);

        brick       = blockFactory.GetBrick(20, 20);
        brick.State = BrickState.Burn;
        visualizer.Add(brick);

        visualizer.Start();
    }
Beispiel #4
0
    public void PlayerDrawTest() // todo refactor
    {
        timer = new Timer()
        {
            Interval = 70,
            Enabled  = true,
        };
        timer.Elapsed += eh;

        player = new Player(40, 40);
        var visualizer = new ElementVisualizaer();

        visualizer.Add(player);

        visualizer.Start();
    }
Beispiel #5
0
    public void ManualAnimationDisplayTest()
    {
        string path       = @"Animation\AnimatedTestImage.png";
        var    visualizer = new ElementVisualizaer();

        var animation1 = new Animation(path, 30, new MyTimer(50));
        var animation2 = new Animation(path, 30, new MyTimer(150));

        animation1.Start();
        animation2.Start();

        visualizer.Add(new TestAnimationElement()
        {
            Animation = animation1, X = 0, Y = 0
        });
        visualizer.Add(new TestAnimationElement()
        {
            Animation = animation2, X = 30, Y = 0
        });

        visualizer.Start();
    }