/// <summary> /// Generates the first level /// </summary> public void GenerateFirstLevel() { levelWidth = levelHeight = 8; levelTime = levelHeight * 3; current = new Level(levelWidth, levelHeight, 101, 82, levelTime); Avatar.Instance().Revive(); current.InsertGameObject(Avatar.Instance()); Avatar.Instance().kinetics.position = current.firstPosition; currentLevel = 15; radarShader = new RadarShader(TreasureHunter.graphics, current.radar.map, radar); light = new Light(TreasureHunter.graphics); light.position.X = current.treasure.kinetics.position.X + current.treasure.kinetics.boundingBox.Width / 2; light.position.Y = current.treasure.kinetics.position.Y + current.treasure.kinetics.boundingBox.Height / 2; light.color = current.treasure.color; }
/// <summary> /// Generates the next consecutive level /// </summary> public void GenerateNextLevel() { ScreenManager.Instance().Push(new ScoreScreen((int)current.timeLeft.CurrentTime(), current.MaxCombo, (int)current.discovered, GraphicsManager.renderTargetFinal)); levelWidth++; levelHeight++; levelTime = levelHeight * 3; current = new Level(levelWidth, levelHeight, current.CellWidth(), current.CellHeight(), levelTime); Avatar.Instance().Revive(); current.InsertGameObject(Avatar.Instance()); Avatar.Instance().kinetics.position = current.firstPosition; Avatar.Instance().Reset(); currentLevel++; radarShader = new RadarShader(TreasureHunter.graphics, current.radar.map, radar); light = new Light(TreasureHunter.graphics); light.position.X = current.treasure.kinetics.position.X + current.treasure.kinetics.boundingBox.Width / 2; light.position.Y = current.treasure.kinetics.position.Y + current.treasure.kinetics.boundingBox.Height / 2; light.color = current.treasure.color; }