Пример #1
0
        public Level(int levelIndex, ContentManager content, standard endLevel)
        {
            string level = Levels.LevelData.LevelText[levelIndex];
            this.content = content;
            camera = new Camera();
            LoadLevel(level);

            cloudTexture = content.Load<Texture2D>("Cloud");
            for (int n = 0; n < tiles.GetLength(0) * tiles.GetLength(1) / 20.0f; n++)
            {
                clouds.Add(new Vector2(Helper.rnd.Next((int)(tiles.GetLength(0) * Tile.TileSize.X / 0.2f)),
                    Helper.rnd.Next((int)(tiles.GetLength(1) * Tile.TileSize.Y / 0.2f))));
            }

            scroll = new GroundScroll(content, tiles.GetLength(1));

            this.endLevel = endLevel;
        }
Пример #2
0
        public Level(int levelIndex, ContentManager content, standard endLevel)
        {
            string level = Levels.LevelData.LevelText[levelIndex];

            this.content = content;
            camera       = new Camera();
            LoadLevel(level);

            cloudTexture = content.Load <Texture2D>("Cloud");
            for (int n = 0; n < tiles.GetLength(0) * tiles.GetLength(1) / 20.0f; n++)
            {
                clouds.Add(new Vector2(Helper.rnd.Next((int)(tiles.GetLength(0) * Tile.TileSize.X / 0.2f)),
                                       Helper.rnd.Next((int)(tiles.GetLength(1) * Tile.TileSize.Y / 0.2f))));
            }

            scroll = new GroundScroll(content, tiles.GetLength(1));

            this.endLevel = endLevel;
        }