public LevelData buildLevel(int level) { LevelData levelData = new LevelData(); levelData.levelName = "level" + level; // main background SpriteData newSprite = new SpriteData(); newSprite.obstacleType = collisionType.BACKGROUND; newSprite.textureName = "backgroundnewstars"; newSprite.color = Color.White; newSprite.position = new Vector2(512, 384); newSprite.gameSpeed = Vector2.Zero; levelData.sprites.Add(newSprite); // 1 background hill newSprite = new SpriteData(); newSprite.textureName = "hill back"; newSprite.position = new Vector2(100, 500); newSprite.scale = 0.5f; newSprite.obstacleType = collisionType.BACKGROUND; newSprite.gameSpeed = new Vector2(50, 0); levelData.sprites.Add(newSprite); // 2 background hill newSprite = new SpriteData(); newSprite.textureName = "hill back"; newSprite.position = new Vector2(250, 400); newSprite.scale = 0.5f; newSprite.obstacleType = collisionType.BACKGROUND; newSprite.gameSpeed = new Vector2(50, 0); levelData.sprites.Add(newSprite); // 3 background hill newSprite = new SpriteData(); newSprite.textureName = "hill back"; newSprite.position = new Vector2(400, 550); newSprite.scale = 0.5f; newSprite.obstacleType = collisionType.BACKGROUND; newSprite.gameSpeed = new Vector2(50, 0); levelData.sprites.Add(newSprite); // 4 background hill newSprite = new SpriteData(); newSprite.textureName = "hill back"; newSprite.position = new Vector2(550, 300); newSprite.scale = 0.5f; newSprite.obstacleType = collisionType.BACKGROUND; newSprite.gameSpeed = new Vector2(50, 0); levelData.sprites.Add(newSprite); // 5 background hill newSprite = new SpriteData(); newSprite.textureName = "hill back"; newSprite.position = new Vector2(700, 450); newSprite.scale = 0.5f; newSprite.obstacleType = collisionType.BACKGROUND; newSprite.gameSpeed = new Vector2(50, 0); levelData.sprites.Add(newSprite); // 6 background hill newSprite = new SpriteData(); newSprite.textureName = "hill back"; newSprite.position = new Vector2(850, 400); newSprite.scale = 0.5f; newSprite.obstacleType = collisionType.BACKGROUND; newSprite.gameSpeed = new Vector2(50, 0); levelData.sprites.Add(newSprite); // 7 background hill newSprite = new SpriteData(); newSprite.textureName = "hill back"; newSprite.position = new Vector2(1000, 550); newSprite.scale = 0.5f; newSprite.obstacleType = collisionType.BACKGROUND; newSprite.gameSpeed = new Vector2(50, 0); levelData.sprites.Add(newSprite); // Sun newSprite = new SpriteData(); newSprite.obstacleType = collisionType.BACKGROUND; newSprite.textureName = "sun"; newSprite.scale = 0.35f; newSprite.color = Color.White; newSprite.position = new Vector2(800, 85); newSprite.gameSpeed = new Vector2(35, 0); levelData.sprites.Add(newSprite); // Sun glow newSprite = new SpriteData(); newSprite.obstacleType = collisionType.BACKGROUND; newSprite.textureName = "sun glow"; newSprite.scale = 0.35f; newSprite.color = Color.White; newSprite.position = new Vector2(800, 85); newSprite.gameSpeed = new Vector2(35, 0); levelData.sprites.Add(newSprite); // 1 rainbow newSprite = new SpriteData(); newSprite.textureName = "rainbow"; newSprite.position = new Vector2(400, 200); newSprite.scale = 0.65f; newSprite.obstacleType = collisionType.BACKGROUND; newSprite.gameSpeed = new Vector2(0, 0); levelData.sprites.Add(newSprite); // 1 platform newSprite = new SpriteData(); newSprite.position = new Vector2(1000, 400); newSprite.repeat = false; levelData.sprites.Add(newSprite); // 2 platform newSprite = new SpriteData(); newSprite.position = new Vector2(1100, 320); newSprite.repeat = false; levelData.sprites.Add(newSprite); // 3 platform newSprite = new SpriteData(); newSprite.position = new Vector2(1250, 320); newSprite.repeat = false; levelData.sprites.Add(newSprite); // 4 platform newSprite = new SpriteData(); newSprite.position = new Vector2(1350, 240); newSprite.repeat = false; levelData.sprites.Add(newSprite); // 5 platform newSprite = new SpriteData(); newSprite.position = new Vector2(1450, 160); newSprite.repeat = false; levelData.sprites.Add(newSprite); // 6 platform newSprite = new SpriteData(); newSprite.position = new Vector2(1600, 220); newSprite.repeat = false; levelData.sprites.Add(newSprite); // 7 platform newSprite = new SpriteData(); newSprite.position = new Vector2(1750, 280); newSprite.repeat = false; levelData.sprites.Add(newSprite); // 8 platform newSprite = new SpriteData(); newSprite.position = new Vector2(1900, 340); newSprite.repeat = false; levelData.sprites.Add(newSprite); // 1 pinwheel newSprite = new SpriteData(); newSprite.obstacleType = collisionType.OBSTACLE; newSprite.textureName = "pin wheel"; newSprite.scale = 0.4f; newSprite.position = new Vector2(2080, 350); newSprite.rotationSpeed = 0.02f; newSprite.repeat = false; levelData.sprites.Add(newSprite); newSprite = new SpriteData(); newSprite.obstacleType = collisionType.OBSTACLE; newSprite.textureName = "pin"; newSprite.scale = 0.4f; newSprite.position = new Vector2(2080, 350); newSprite.repeat = false; levelData.sprites.Add(newSprite); return levelData; }
static LevelData dummyLevel() { LevelData dummyData = new LevelData(); // Create background(s) SpriteData dummyBackground = new SpriteData(); dummyBackground.obstacleType = collisionType.BACKGROUND; dummyBackground.textureName = "backgroundnewstars"; dummyBackground.color = Color.White; dummyBackground.position = new Vector2(512, 384); dummyBackground.gameSpeed = Vector2.Zero; dummyData.sprites.Add(dummyBackground); SpriteData dummySun = new SpriteData(); dummySun.obstacleType = collisionType.BACKGROUND; dummySun.textureName = "sun"; dummySun.scale = 0.35f; dummySun.color = Color.White; dummySun.position = new Vector2(600, 85); dummySun.gameSpeed = new Vector2(80, 0); dummyData.sprites.Add(dummySun); SpriteData dummySunGlow = new SpriteData(); dummySunGlow.obstacleType = collisionType.BACKGROUND; dummySunGlow.textureName = "sun glow"; dummySunGlow.scale = 0.35f; dummySunGlow.color = Color.White; dummySunGlow.position = new Vector2(600, 85); dummySunGlow.gameSpeed = new Vector2(80, 0); dummyData.sprites.Add(dummySunGlow); SpriteData dummyCloud = new SpriteData(); dummyCloud.obstacleType = collisionType.BACKGROUND; dummyCloud.textureName = "cloud 3"; dummyCloud.scale = 0.2f; dummyCloud.color = Color.White; dummyCloud.position = new Vector2(600, 85); dummyCloud.gameSpeed = new Vector2(100, 0); dummyData.sprites.Add(dummyCloud); SpriteData dummyTopCloud1 = new SpriteData(); dummyTopCloud1.obstacleType = collisionType.BACKGROUND; dummyTopCloud1.textureName = "top cloud"; dummyTopCloud1.scale = 0.47f; dummyTopCloud1.color = Color.White; dummyTopCloud1.position = new Vector2(400, 465); dummyTopCloud1.gameSpeed = new Vector2(125, 0); dummyData.sprites.Add(dummyTopCloud1); SpriteData dummyTopCloud2 = new SpriteData(); dummyTopCloud2.obstacleType = collisionType.BACKGROUND; dummyTopCloud2.textureName = "top cloud"; dummyTopCloud2.scale = 0.47f; dummyTopCloud2.color = Color.White; dummyTopCloud2.position = new Vector2(1205, 465); dummyTopCloud2.gameSpeed = new Vector2(125, 0); dummyData.sprites.Add(dummyTopCloud2); /* SpriteData backbackground = new SpriteData(); backbackground.obstacleType = collisionType.BACKGROUND; backbackground.textureName = "backbackground"; backbackground.scale = 0.4f; backbackground.color = Color.White; backbackground.position = new Vector2(0, 150); backbackground.gameSpeed = new Vector2(200, 0); dummyData.sprites.Add(backbackground); SpriteData backbackground2 = new SpriteData(); backbackground2.obstacleType = collisionType.BACKGROUND; backbackground2.textureName = "backbackground"; backbackground2.scale = 0.4f; backbackground2.color = Color.White; backbackground2.position = new Vector2(1125, 150); backbackground2.gameSpeed = new Vector2(200, 0); dummyData.sprites.Add(backbackground2); */ // Create platform(s) SpriteData dummyPlatform = new SpriteData(); dummyData.sprites.Add(dummyPlatform); // Create obstacle(s) SpriteData dummyObstacle = new SpriteData(); dummyObstacle.obstacleType = collisionType.OBSTACLE; dummyObstacle.textureName = "LOL"; dummyObstacle.scale = 0.2f; dummyObstacle.color = Color.Red; dummyObstacle.position = new Vector2(175, 165); dummyObstacle.rotationSpeed = 0.02f; dummyObstacle.rotationDirection = -1f; dummyData.sprites.Add(dummyObstacle); return dummyData; }