Beispiel #1
0
        static void LevelLoader_Block2()
        {
            loaders.Add("brick", (game, x, y) =>
            {
                game.Map.SetBlock(x, y, new Brick(game));
            });
            loaders.Add("coinBlock", (game, x, y) =>
            {
                IItem coin = new Coin(game, new Vector2(x, y - 1));
                coin.AutoCosume(50);
                coin.Velocity = new LVector2(Coin.popVelocity.Vector, Limit <Vector2> .NONE);
                game.Map.SetBlock(x, y, new QuestionBlock(game, coin));
            });
            loaders.Add("mushroomBlock", (game, x, y) =>
            {
                game.Map.SetBlock(x, y, new QuestionBlock(game, new Mushroom(game, x, y - 1)));
            });
            loaders.Add("oneUpBlock", (game, x, y) =>
            {
                game.Map.SetBlock(x, y, new QuestionBlock(game, new MushroomOneUp(game, x, y - 1)));
            });
            loaders.Add("flowerBlock", (game, x, y) =>
            {
                game.Map.SetBlock(x, y, new QuestionBlock(game, new FireFlower(game, x, y)));
            });
            loaders.Add("starBlock", (game, x, y) =>
            {
                game.Map.SetBlock(x, y, new QuestionBlock(game, new Star(game, x, y)));
            });

            loaders.Add("step", (game, x, y) =>
            {
                game.Map.SetBlock(x, y, new Steps());
            });

            loaders.Add("Princess", (game, x, y) =>
            {
                game.Map.SetBlock(x, y, new Princess());
                game.Map.SetHiddenBlock(x, y - 1, new HiddenBlock(game, null));
            });

            loaders.Add("Bridge", (game, x, y) => { game.Map.SetBlock(x, y, new Bridge()); });
        }