public Level10(int boxesMax, int boxNeed, Vector3 spawnPoint, List<Vector3> billboardList,
            Theme levelTheme, BaseModel levelModel, BaseModel levelModelTwo, BaseModel[] glassModels, Goal catcher,
            Dictionary<OperationalMachine, bool> machines, List<Tube> tubes, LevelCompletionData data, string name)
            : base(10, boxesMax, boxNeed, spawnPoint, billboardList, levelTheme, levelModel, glassModels,
            catcher, null, machines, tubes, data, name)
        {
            currentCameraPoint = RenderingDevice.Camera.Position;

            boxesMaxOne = boxesMax;
            boxesNeedOne = boxNeed;
            boxesMaxTwo = 20;
            boxesNeedTwo = 10;

            spawnTheFirst = spawnPoint;
            spawnTheSecond = new Vector3(197.153f, -4.134f, 1.5f);

            catcherTheFirst = normalCatcher;
            catcherTheSecond = new Goal(new Vector3(313.454f, -3.801f, 5.5f), true);

            baseTheSecond = levelModelTwo;

            Vector3 pos = new Vector3(198.273f, -4.468f, 6.037f);
            ADVertexFormat[] verts = new ADVertexFormat[4];
            verts[0] = new ADVertexFormat(new Vector3(0, 13.686f / 2, -11.359f / 2) + pos, new Vector2(0, 0), Vector3.UnitX);
            verts[1] = new ADVertexFormat(new Vector3(0, -13.686f / 2, -11.359f / 2) + pos, new Vector2(0, 1), Vector3.UnitX);
            verts[2] = new ADVertexFormat(new Vector3(0, 13.686f / 2, 11.359f / 2) + pos, new Vector2(1, 1), Vector3.UnitX);
            verts[3] = new ADVertexFormat(new Vector3(0, -13.686f / 2, 11.359f / 2) + pos, new Vector2(1, 0), Vector3.UnitX);

            buff = new VertexBuffer(RenderingDevice.GraphicsDevice, ADVertexFormat.VertexDeclaration, 4, BufferUsage.WriteOnly);
            buff.SetData(verts);

            blackTex = new Texture2D(RenderingDevice.GraphicsDevice, 1, 1);
            blackTex.SetData(new Color[] { new Color(0, 0, 0, 255) });
        }
 /// <summary>
 /// Creates a new Level 9.
 /// </summary>
 /// <param name="boxesMax">Max boxes allowed.</param>
 /// <param name="boxNeed">Boxes needed.</param>
 /// <param name="spawnPoint">Spawn point.</param>
 /// <param name="billboardsThisLevel">List of billboards.</param>
 /// <param name="levelTheme">Theme of the level.</param>
 /// <param name="levelModel">Base terrain of the level.</param>
 /// <param name="glassModels">Array of glass models.</param>
 /// <param name="normalCatcher">Goal.</param>
 /// <param name="machines">List of machines.</param>
 /// <param name="tubes">List of tubes.</param>
 /// <param name="data">LevelCompletionData.</param>
 /// <param name="name">Name of the level.</param>
 public Level9(int boxesMax, int boxNeed, Vector3 spawnPoint, List<Vector3> billboardsThisLevel,
     BaseModel levelModel, BaseModel[] glassModels, Goal normalCatcher, Goal coloredCatcher,
     Dictionary<OperationalMachine, bool> machines, List<Tube> tubes, LevelCompletionData data, string name)
     : base(9, boxesMax, boxNeed, spawnPoint, billboardsThisLevel, Theme.Beach, levelModel, glassModels, normalCatcher, coloredCatcher,
     machines, tubes, data, name)
 {
 }
        public LevelSelectData(int score, int lost, TimeSpan time, bool p_3, bool unlocked, LevelCompletionData data)
        {
            if(score >= data.ThreeStarScore)
                ScoreStarNumber = Stars.Three;
            //else if(score >= data.TwoStarScore)
            //    ScoreStarNumber = Stars.Two;
            //else if(score >= data.OneStarScore)
            //    ScoreStarNumber = Stars.One;
            else
                ScoreStarNumber = Stars.Zero;

            if(time <= data.ThreeStarTime)
                TimeStarNumber = Stars.Three;
            //else if(time <= data.TwoStarTime)
            //    TimeStarNumber = Stars.Two;
            //else if(time <= data.OneStarTime)
            //    TimeStarNumber = Stars.One;
            else
                TimeStarNumber = Stars.Zero;

            if(lost <= data.ThreeStarBoxes)
                BoxStarNumber = Stars.Three;
            //else if(lost <= data.TwoStarBoxes)
            //    BoxStarNumber = Stars.Two;
            //else if(lost <= data.OneStarBoxes)
            //    BoxStarNumber = Stars.One;
            else
                BoxStarNumber = Stars.Zero;

            Score = score;
            BoxesLost = lost;
            Time = time;
            Unlocked = unlocked;
            Completed = p_3;
        }
 /// <summary>
 /// Creates a new Ice level.
 /// </summary>
 /// <param name="boxesMax">Max boxes allowed.</param>
 /// <param name="boxNeed">Boxes needed.</param>
 /// <param name="spawnPoint">Spawn point.</param>
 /// <param name="billboardsThisLevel">List of billboards.</param>
 /// <param name="levelTheme">Theme of the level.</param>
 /// <param name="levelModel">Base terrain of the level.</param>
 /// <param name="glassModels">Array of glass models.</param>
 /// <param name="normalCatcher">Goal.</param>
 /// <param name="machines">List of machines.</param>
 /// <param name="tubes">List of tubes.</param>
 /// <param name="data">LevelCompletionData.</param>
 /// <param name="name">Name of the level.</param>
 public IceLevel(int level, int boxesMax, int boxNeed, Vector3 spawnPoint, List<Vector3> billboardsThisLevel,
     BaseModel levelModel, BaseModel extras, BaseModel[] glassModels, Goal normalCatcher,
     Dictionary<OperationalMachine, bool> machines, List<Tube> tubes, LevelCompletionData data, string name)
     : base(level, boxesMax, boxNeed, spawnPoint, billboardsThisLevel, Theme.Ice, levelModel, glassModels, normalCatcher,
     null, machines, tubes, data, name)
 {
     this.extras = extras;
 }
 /// <summary>
 /// Creates a new Level 6.
 /// </summary>
 /// <param name="boxesMax">Max boxes allowed.</param>
 /// <param name="boxNeed">Boxes needed.</param>
 /// <param name="spawnPoint">Spawn point.</param>
 /// <param name="billboardsThisLevel">List of billboards.</param>
 /// <param name="levelTheme">Theme of the level.</param>
 /// <param name="levelModel">Base terrain of the level.</param>
 /// <param name="glassModels">Array of glass models.</param>
 /// <param name="normalCatcher">Goal.</param>
 /// <param name="machines">List of machines.</param>
 /// <param name="tubes">List of tubes.</param>
 /// <param name="data">LevelCompletionData.</param>
 /// <param name="name">Name of the level.</param>
 /// <param name="plane">Tacos.</param>
 public Level6(int boxesMax, int boxNeed, Vector3 spawnPoint, List<Vector3> billboardsThisLevel,
     BaseModel levelModel, BaseModel extras, BaseModel[] glassModels, Goal normalCatcher,
     Dictionary<OperationalMachine, bool> machines, List<Tube> tubes, LevelCompletionData data, string name, BaseModel plane)
     : base(6, boxesMax, boxNeed, spawnPoint, billboardsThisLevel, levelModel, extras, glassModels, normalCatcher,
     machines, tubes, data, name)
 {
     invisiblePlane = plane;
     //spawnBlackBox = true;
 }
        /// <summary>
        /// Create a new level.
        /// </summary>
        /// <param name="levelNo">The level number.</param>
        /// <param name="boxesMax">The number of boxes the level will give you.</param>
        /// <param name="boxNeed">The amount of boxes you need to win.</param>
        /// <param name="spawnPoint">The Vector3 to spawn boxes at.</param>
        /// <param name="levelTheme">The theme to use.</param>
        /// <param name="glassModels">The array of glass models to use.</param>
        /// <param name="billboardsThisLevel">A list of Vector3's that determine the location
        /// of this level's machine's billboards.</param>
        /// <param name="levelModel">A model of the level's static parts (machine bases and such).</param>
        /// <param name="machines">A list of machines in this level.</param>
        /// <param name="coloredCatcher">If the level has a colored catcher, this is it.</param>
        /// <param name="normalCatcher">The level's Catcher.</param>
        /// <param name="tubes">All the tubes. Lots... and lots... of tubes.</param>
        /// <param name="data">Data detailing the elite requirements of complete completion.</param>
        /// <param name="name">Level's name.</param>
        public Level(int levelNo, int boxesMax, int boxNeed, Vector3 spawnPoint, List<Vector3> billboardsThisLevel,
            Theme levelTheme, BaseModel levelModel, BaseModel[] glassModels, Goal normalCatcher, Goal coloredCatcher,
            Dictionary<OperationalMachine, bool> machines, List<Tube> tubes, LevelCompletionData data, string name)
        {
            levelNumber = levelNo;
            this.levelTheme = levelTheme;
            scoreboard = new Scoreboard(levelTheme.TextColor, boxNeed, boxesMax, 16333);
            this.boxesMax = boxesMax;
            boxesSaved = 0;
            BoxesDestroyed = 0;
            BoxesRemaining = boxesMax;
            boxesNeeded = boxNeed;
            BoxSpawnPoint = spawnPoint;
            levelName = name;
            boxesOnscreen = new List<Box>();
            tubeList = new List<Tube>(tubes);
            MachineList = new Dictionary<OperationalMachine, bool>(machines);
            Board = new Billboard(effectDelegate);

            this.levelModel = levelModel;
            //LevelModel.Lighting = levelTheme.Lighting;
            this.glassModels = new List<BaseModel>();
            textureList = new Texture2D[billboardsThisLevel.Count];
            activeList = new Texture2D[billboardsThisLevel.Count];

            this.normalCatcher = normalCatcher;
            this.coloredCatcher = coloredCatcher;

            CompletionData = data;

            foreach(BaseModel m in glassModels)
                this.glassModels.Add(m);
            foreach(OperationalMachine mach in machines.Keys)
                foreach(BaseModel m in mach.GetGlassModels())
                    this.glassModels.Add(m);

            //foreach(Machine m in machines.Keys)
            //    m.ApplyLighting(levelTheme.Lighting);

            if(billboardsThisLevel.Count != 0)
                Board.CreateBillboardVerticesFromList(billboardsThisLevel);

            for(int i = 0; i < textureList.Length; i++)
            {
                textureList[i] = billboardList[i];
                activeList[i] = activeBillboardList[i];
            }

            dispenser = new BaseModel(Dispenser, false, null, BoxSpawnPoint);
            dispenser.Ent.BecomeKinematic();

            //if(levelNumber != 0)
            //    Program.Game.Manager.CurrentSave.LevelData.SetCompletionData(levelNumber, data);

            gdmReset += onGDMReset;
        }
 public ResultsScreen(TimeSpan timeTaken, int boxesLost, int score, int level, LevelCompletionData data)
 {
     this.levelNumber = level;
     completionData = data;
     time = new TimeSpan(timeTaken.Ticks);
     lost = boxesLost;
     this.score = score;
     //plane = Resources.resultsPlane;
     timer = new Timer(3000, OnFirstFire, false);
     entity = new BEPUphysics.Entities.Prefabs.Box(Vector3.Zero, 20, 20, 1);
     //transforms = new Matrix[plane.Bones.Count];
     screenSpace = new Rectangle(0, 0, (int)RenderingDevice.Width, (int)RenderingDevice.Height);
     color = new Color(0, 0, 0, 255);
 }