Example #1
0
        public Level1(GSPlay gsPlay)
            : base(gsPlay)
        {
            levelDataTexture = gsPlay.LoadTexture("Levels/level1Data");

            player1Pos = GridToPosition(42, 25);
            player2Pos = GridToPosition(40, 25);

            //player1Pos = GridToPosition(673, 20);
            //player2Pos = player1Pos;

            portalPos = GridToPosition(681, 20);
            pItemPos = GridToPosition(672, 11);

            SetupLevel();

            leftLimit = 32;
            rightLimit = levelWidth - 32;

            gsPlay.cameraPlayer1.Update();
            gsPlay.cameraPlayer2.Update();

            gsPlay.cameraPlayer1.SnapToTarget();
            gsPlay.cameraPlayer2.SnapToTarget();

            //Deactivate players for intro scene:
            StartIntro();

            Vector2 bgPosition = new Vector2(-500, -500);
            for (int x = 0; x < 34; x++)
            {
                SpriteIMG bg1 = new SpriteIMG(gsPlay.LoadTexture("BGs/fieldBackdropBase1"), bgPosition);
                bg1.SetPlayerMode(PlayerObjectMode.One);
                gsPlay.AddParallax(bg1, .1f);
                SpriteIMG bg2 = new SpriteIMG(gsPlay.LoadTexture("BGs/fieldBackdropBase2"), bgPosition);
                bg2.SetPlayerMode(PlayerObjectMode.Two);
                gsPlay.AddParallax(bg2, .1f);

                bgPosition.X += 1024;
            }

            bgPosition = new Vector2(-800, -500);
            for (int x = 0; x < 6; x++)
            {
                SpriteIMG bg1 = new SpriteIMG(gsPlay.LoadTexture("BGs/fieldBackdropOverlay1"), bgPosition);
                bg1.SetPlayerMode(PlayerObjectMode.One);
                gsPlay.AddParallax(bg1, .2f);
                SpriteIMG bg2 = new SpriteIMG(gsPlay.LoadTexture("BGs/fieldBackdropOverlay2"), bgPosition);
                bg2.SetPlayerMode(PlayerObjectMode.Two);
                gsPlay.AddParallax(bg2, .2f);

                bgPosition.X += 1024;
            }

            bgPosition = new Vector2(-300, -300);
            for (int x = 0; x < 11; x++)
            {
                SpriteIMG bg1 = new SpriteIMG(gsPlay.LoadTexture("BGs/fieldMatte1"), bgPosition);
                bg1.SetPlayerMode(PlayerObjectMode.One);
                gsPlay.AddParallax(bg1, .5f);
                SpriteIMG bg2 = new SpriteIMG(gsPlay.LoadTexture("BGs/fieldMatte2"), bgPosition);
                bg2.SetPlayerMode(PlayerObjectMode.Two);
                gsPlay.AddParallax(bg2, .5f);

                bgPosition.X += 1024;
            }

            //672, 13
            gsPlay.AddBGWarmGear(gsPlay.LoadTexture("GameObjects/gearWarm3"), GridToCenterPosition(672, 13), .75f, .02f, 1);
            gsPlay.AddBGCoolGear(gsPlay.LoadTexture("GameObjects/gearCool3"), GridToCenterPosition(672, 13), .75f, .02f, 1);

            for (int x = 1; x <= 22; x++)
            {
                for (int y = 1; y <= 1; y++)
                {
                    string fgName = "LevelTiles/Field/fieldCoolFG" + x + "x" + y;
                    if (File.Exists("Content/" + fgName + ".xnb"))
                    {
                        SpriteIMG fg = gsPlay.AddFrontFGTile(gsPlay.LoadTexture(fgName), new Vector2(1024 * (x - 1), 1024 * (y - 1)));
                        fg.origin = Vector2.Zero;
                        fg.SetPlayerMode(PlayerObjectMode.Two);
                    }

                    string bgName = "LevelTiles/Field/fieldCoolBG" + x + "x" + y;
                    if (File.Exists("Content/" + bgName + ".xnb"))
                    {
                        SpriteIMG bg = gsPlay.AddBackFGTile(gsPlay.LoadTexture(bgName), new Vector2(1024 * (x - 1), 1024 * (y - 1)));
                        bg.origin = Vector2.Zero;
                        bg.SetPlayerMode(PlayerObjectMode.Two);
                    }

                }
            }

            for (int x = 1; x <= 22; x++)
            {
                for (int y = 1; y <= 1; y++)
                {
                    string fgName = "LevelTiles/Field/fieldWarmFG" + x + "x" + y;
                    if (File.Exists("Content/" + fgName + ".xnb"))
                    {
                        SpriteIMG fg = gsPlay.AddFrontFGTile(gsPlay.LoadTexture(fgName), new Vector2(1024 * (x - 1), 1024 * (y - 1)));
                        fg.origin = Vector2.Zero;
                        fg.SetPlayerMode(PlayerObjectMode.One);

                    }

                    string bgName = "LevelTiles/Field/fieldWarmBG" + x + "x" + y;
                    if (File.Exists("Content/" + bgName + ".xnb"))
                    {
                        SpriteIMG bg = gsPlay.AddBackFGTile(gsPlay.LoadTexture(bgName), new Vector2(1024 * (x - 1), 1024 * (y - 1)));
                        bg.origin = Vector2.Zero;
                        bg.SetPlayerMode(PlayerObjectMode.One);
                    }

                }
            }

            TriggerArea update = gsPlay.AddTriggerArea(new EventTrigger(this, 99), Art.barrier, Vector2.Zero);

            atmosphereLight = new Color(255, 255, 255);

            doubleButtonDoor = gsPlay.AddOpeningDoor(Art.door, Level.GridToPosition(new Point(214, 23)), Level.GridToPosition(new Point(214, 27)), OpenState.Closed);  //first door puzzle
            Button b1 = gsPlay.AddButton(new EventTrigger(this, 1), 1, gsPlay.LoadTexture("TestSprites/button"), Level.GridToPosition(new Point(206, 29)));                                            //first door puzzle
            Button b2 = gsPlay.AddButton(new EventTrigger(this, 2), 1, gsPlay.LoadTexture("TestSprites/button"), Level.GridToPosition(new Point(222, 29)));                                            //first door puzzle
            LightningChain lc1 = gsPlay.AddLightning(b1.position, doubleButtonDoor.position, Color.Green);
            lc1.ConvertEndPointToTarget(doubleButtonDoor);
            b1.AddEvent(new EventTrigger(this, lc1));
            LightningChain lc2 = gsPlay.AddLightning(b2.position, doubleButtonDoor.position, Color.Green);
            lc2.ConvertEndPointToTarget(doubleButtonDoor);
            b2.AddEvent(new EventTrigger(this, lc2));
            //lc3.AddVertex(GridToPosition(103, 46) + new Vector2(0, 16));
            //gsPlay.AddBouncyBall(.5f, gsPlay.LoadTexture("TestSprites/pickUp"), Level.GridToPosition(new Point(222, 16)));

            Door d2 = gsPlay.AddOpeningDoor(Art.door, Level.GridToPosition(new Point(305, 23)), Level.GridToPosition(new Point(305, 27)), OpenState.Closed);  //jump from box, ball on button
            Button b3 = gsPlay.AddButton(new EventTrigger(this, d2), 1, gsPlay.LoadTexture("TestSprites/button"), Level.GridToPosition(new Point(297, 29)));                                            //jump from box, ball on button
            gsPlay.AddMoveable(gsPlay.LoadTexture("TestSprites/moveable"), Level.GridToPosition(new Point(257, 16)), .8f);                                                                  //jump from box, ball on button
            gsPlay.AddBouncyBall(.5f, gsPlay.LoadTexture("TestSprites/pickUp"), Level.GridToPosition(new Point(280, 16)));                                                                  //jump from box, ball on button
            LightningChain lc3 = gsPlay.AddLightning(b3.position, d2.position, Color.Green);
            lc3.ConvertEndPointToTarget(d2);
            b3.AddEvent(new EventTrigger(this, lc3));

            Door d3 = gsPlay.AddOpeningDoor(Art.door, Level.GridToPosition(new Point(329, 23)), Level.GridToPosition(new Point(329, 27)), OpenState.Closed);  //throw ball onto button
            gsPlay.AddBouncyBall(.5f, gsPlay.LoadTexture("TestSprites/pickUp"), Level.GridToPosition(new Point(312, 16)));                                                                  //throw ball onto button
            Button b4 = gsPlay.AddButton(new EventTrigger(this, d3), 1, gsPlay.LoadTexture("TestSprites/button"), Level.GridToPosition(new Point(326, 22)));                                            //throw ball onto button
            LightningChain lc4 = gsPlay.AddLightning(b4.position, d3.position, Color.Green);
            lc4.ConvertEndPointToTarget(d3);
            b4.AddEvent(new EventTrigger(this, lc4));

            Door d4 = gsPlay.AddOpeningDoor(Art.door, Level.GridToPosition(new Point(373, 23)), Level.GridToPosition(new Point(373, 27)), OpenState.Closed);  //box drop
            gsPlay.AddMoveable(gsPlay.LoadTexture("TestSprites/moveable"), Level.GridToPosition(new Point(339, 16)), .8f);                                                                  //box drop
            gsPlay.AddBouncyBall(.8f, gsPlay.LoadTexture("TestSprites/pickUp"), Level.GridToPosition(new Point(358, 16)));                                                                   //box drop
            Button b5 = gsPlay.AddButton(new EventTrigger(this, d4), 2, gsPlay.LoadTexture("TestSprites/button"), Level.GridToPosition(new Point(365, 29)));                                            //box drop
            gsPlay.AddBouncyBall(.5f, gsPlay.LoadTexture("TestSprites/pickUp"), Level.GridToPosition(new Point(370, 16)));                                                                  //box drop
            gsPlay.AddPlatform(Art.platform, Level.GridToPosition(new Point(351, 21)), Level.GridToPosition(new Point(346, 21)));                             //box drop
            LightningChain lc5 = gsPlay.AddLightning(b5.position, d4.position, Color.Green);
            lc5.ConvertEndPointToTarget(d4);
            b5.AddEvent(new EventTrigger(this, lc5));

            gsPlay.AddMoveable(gsPlay.LoadTexture("TestSprites/moveable"), Level.GridToPosition(new Point(378, 16)), .8f);                                                                  //box accross moving
            gsPlay.AddPlatform(Art.platform, Level.GridToPosition(new Point(398, 25)), Level.GridToPosition(new Point(406, 25)));                             //box accross moving
            gsPlay.AddPlatform(Art.platform, Level.GridToPosition(new Point(386, 25)), Level.GridToPosition(new Point(386, 30)));                             //box accross moving

            Door d5 = gsPlay.AddFadingDoor(Art.door, Level.GridToPosition(new Point(561, 24)), OpenState.Closed);                                             //barn door
            FlipSwitch s1 = gsPlay.AddOnSwitch(new EventTrigger(this, d5), gsPlay.LoadTexture("TestSprites/switch"), Level.GridToPosition(new Point(556, 25)));                                               //barn door
            LightningChain lc6 = gsPlay.AddLightning(s1.position, GridToPosition(556, 26) + new Vector2(0, 16), Color.Green);
            lc6.AddVertex(GridToPosition(561, 26) + new Vector2(0, 16));
            lc6.AddVertex(GridToPosition(561, 26) + new Vector2(0, 0));
            //lc6.ConvertEndPointToTarget(d5);
            s1.AddEvent(new EventTrigger(this, lc6));
            lc6.defaultActive = true;
            lc6.SetActive(true);

            Door d6 = gsPlay.AddOpeningDoor(Art.door, Level.GridToPosition(new Point(570, 15)), Level.GridToPosition(new Point(570, 23)), OpenState.Closed);
            Button b6 = gsPlay.AddButton(new EventTrigger(this, d6), 1, gsPlay.LoadTexture("TestSprites/button"), Level.GridToPosition(new Point(573, 19)));
            gsPlay.AddBouncyBall(.5f, gsPlay.LoadTexture("TestSprites/pickUp"), Level.GridToPosition(new Point(564, 24)));
            LightningChain lc7 = gsPlay.AddLightning(b6.position, d6.position, Color.Green);
            lc7.ConvertEndPointToTarget(d6);
            b6.AddEvent(new EventTrigger(this, lc7));

            Door d7 = gsPlay.AddOpeningDoor(Art.door, Level.GridToPosition(new Point(576, 23)), Level.GridToPosition(new Point(576, 17)), OpenState.Closed);
            Button b7 = gsPlay.AddButton(new EventTrigger(this, d7), 1, gsPlay.LoadTexture("TestSprites/button"), Level.GridToPosition(new Point(579, 19)));
            LightningChain lc8 = gsPlay.AddLightning(b7.position, d7.position, Color.Green);
            lc8.ConvertEndPointToTarget(d7);
            b7.AddEvent(new EventTrigger(this, lc8));

            gsPlay.AddMoveable(gsPlay.LoadTexture("TestSprites/moveable"), Level.GridToPosition(new Point(579, 22)), .8f);
            //gsPlay.AddPlatform(Art.platform, Level.GridToPosition(new Point(635, 06)), Level.GridToPosition(new Point(635, 25)));
            MovingPlatform p1 = gsPlay.AddReversePlatform(Art.platform, Level.GridToPosition(new Point(595, 06)), Level.GridToPosition(new Point(595, 25)));
            FlipSwitch s2 = gsPlay.AddSwitch(new EventTrigger(this, p1), gsPlay.LoadTexture("TestSprites/switch"), Level.GridToPosition(new Point(602, 25)));
            LightningChain lc9 = gsPlay.AddLightning(s2.position, GridToPosition(595, 25), Color.Green);
            lc9.AddVertex(p1.position);
            lc9.ConvertEndPointToTarget(p1);
            s2.AddEvent(new EventTrigger(this, lc9));

            Door d8 = gsPlay.AddFadingDoor(Art.door, Level.GridToPosition(new Point(605, 18)), OpenState.Closed);                                                //lower barn exit
            FlipSwitch s3 = gsPlay.AddOnSwitch(new EventTrigger(this, d8), gsPlay.LoadTexture("TestSprites/switch"), Level.GridToPosition(new Point(601, 19)));                                  //lower barn exit
            LightningChain lc10 = gsPlay.AddLightning(s3.position, GridToPosition(601, 20) + new Vector2(0, 16), Color.Green);
            lc10.AddVertex(GridToPosition(605, 20) + new Vector2(0, 16));
            lc10.AddVertex(GridToPosition(605, 20) + new Vector2(0, 0));
            //lc6.ConvertEndPointToTarget(d5);
            s3.AddEvent(new EventTrigger(this, lc10));
            lc10.defaultActive = true;
            lc10.SetActive(true);

            finalTrapDoor = gsPlay.AddOpeningDoor(Art.door, Level.GridToPosition(new Point(600, 28)), Level.GridToPosition(new Point(600, 24)), OpenState.Closed);
            Button finalButton = gsPlay.AddButton(new EventTrigger(this, finalTrapDoor), 2, gsPlay.LoadTexture("TestSprites/button"), Level.GridToPosition(new Point(591, 26)));
            LightningChain lc11 = gsPlay.AddLightning(finalButton.position, GridToPosition(600, 26), Color.Green);
            lc11.AddVertex(finalTrapDoor.position);
            lc11.ConvertEndPointToTarget(finalTrapDoor);
            finalButton.AddEvent(new EventTrigger(this, lc11));

            finalTopDoor = gsPlay.AddFadingDoor(Art.door, Level.GridToPosition(new Point(605, 09)), OpenState.Closed);                                                //upper barn exit
            FlipSwitch finalSwitch = gsPlay.AddOnSwitch(new EventTrigger(this, finalTopDoor), gsPlay.LoadTexture("TestSprites/switch"), Level.GridToPosition(new Point(601, 10)));                    //upper barn exit
            finalSwitch.AddEvent(new EventTrigger(this, 4));
            LightningChain lc12 = gsPlay.AddLightning(finalSwitch.position, GridToPosition(601, 11) + new Vector2(0, 16), Color.Green);
            lc12.AddVertex(GridToPosition(605, 11) + new Vector2(0, 16));
            lc12.AddVertex(GridToPosition(605, 11) + new Vector2(0, 0));
            //lc6.ConvertEndPointToTarget(d5);
            finalSwitch.AddEvent(new EventTrigger(this, lc12));
            lc12.defaultActive = true;
            lc12.SetActive(true);

            AudioManager.PlayMusic("Field");
        }
Example #2
0
        public Level4(GSPlay gsPlay)
            : base(gsPlay)
        {
            levelDataTexture = gsPlay.LoadTexture("Levels/level4Data");

            player1Pos = GridToPosition(15, 10);
            player2Pos = GridToPosition(17, 10);

            //player1Pos = GridToPosition(197, 43);
            //player2Pos = player1Pos;

            portalPos = GridToPosition(232, 48);
            pItemPos = GridToPosition(194, 48);

            renderCollision = false;

            SetupLevel();

            for (int x = 1; x <= 8; x++)
            {
                for (int y = 1; y <= 3; y++)
                {

                    string bgName = "LevelTiles/Cave/caveCoolBG" + x + "x" + y;
                    if (File.Exists("Content/" + bgName + ".xnb"))
                    {
                        SpriteIMG bg = gsPlay.AddBackFGTile(gsPlay.LoadTexture(bgName), new Vector2(1024 * (x - 1), 1024 * (y - 1)));
                        bg.origin = Vector2.Zero;
                        bg.SetPlayerMode(PlayerObjectMode.Two);
                    }

                }
            }
            for (int x = 1; x <= 8; x++)
            {
                for (int y = 1; y <= 3; y++)
                {

                    string bgName = "LevelTiles/Cave/caveWarmBG" + x + "x" + y;
                    if (File.Exists("Content/" + bgName + ".xnb"))
                    {
                        SpriteIMG bg = gsPlay.AddBackFGTile(gsPlay.LoadTexture(bgName), new Vector2(1024 * (x - 1), 1024 * (y - 1)));
                        bg.origin = Vector2.Zero;
                        bg.SetPlayerMode(PlayerObjectMode.One);
                    }

                }
            }

            rightLimit = levelWidth - 32;

            Vector2 bgPosition = new Vector2(-400, -300);
            for (int x = 0; x < 2; x++)
            {
                SpriteIMG bg1 = new SpriteIMG(gsPlay.LoadTexture("BGs/caveBackdropBase1"), bgPosition);
                bg1.SetPlayerMode(PlayerObjectMode.One);
                gsPlay.AddParallax(bg1, .1f);
                SpriteIMG bg2 = new SpriteIMG(gsPlay.LoadTexture("BGs/caveBackdropBase2"), bgPosition);
                bg2.SetPlayerMode(PlayerObjectMode.Two);
                gsPlay.AddParallax(bg2, .1f);

                bgPosition.X += 1024;
            }

            bgPosition = new Vector2(-400, -300);
            for (int x = 0; x < 3; x++)
            {
                SpriteIMG bg1 = new SpriteIMG(gsPlay.LoadTexture("BGs/caveBackdropOverlay1"), bgPosition);
                bg1.SetPlayerMode(PlayerObjectMode.One);
                gsPlay.AddParallax(bg1, .2f);
                SpriteIMG bg2 = new SpriteIMG(gsPlay.LoadTexture("BGs/caveBackdropOverlay2"), bgPosition);
                bg2.SetPlayerMode(PlayerObjectMode.Two);
                gsPlay.AddParallax(bg2, .2f);

                bgPosition.X += 1024;
            }

            bgPosition = new Vector2(-300, -300);
            for (int x = 0; x < 5; x++)
            {
                for (int y = 0; y < 2; y++)
                {
                    SpriteIMG bg1 = new SpriteIMG(gsPlay.LoadTexture("BGs/caveMatte1"), bgPosition);
                    bg1.SetPlayerMode(PlayerObjectMode.One);
                    gsPlay.AddParallax(bg1, .5f);
                    SpriteIMG bg2 = new SpriteIMG(gsPlay.LoadTexture("BGs/caveMatte2"), bgPosition);
                    bg2.SetPlayerMode(PlayerObjectMode.Two);
                    gsPlay.AddParallax(bg2, .5f);

                    bgPosition.Y += 1024;
                }

                bgPosition.Y = -300;
                bgPosition.X += 1024;
            }

            gsPlay.AddBGWarmGear(gsPlay.LoadTexture("GameObjects/gearWarm1"), GridToCenterPosition(195, 45), 1.5f, .01f, 1);
            gsPlay.AddBGCoolGear(gsPlay.LoadTexture("GameObjects/gearCool1"), GridToCenterPosition(195, 45), 1.5f, .01f, 1);
            gsPlay.AddBGWarmGear(gsPlay.LoadTexture("GameObjects/gearWarm3"), GridToCenterPosition(198, 46), .75f, -.022f, 1);
            gsPlay.AddBGCoolGear(gsPlay.LoadTexture("GameObjects/gearCool3"), GridToCenterPosition(198, 46), .75f, -.022f, 1);
            gsPlay.AddBGWarmGear(gsPlay.LoadTexture("GameObjects/gearWarm2"), GridToCenterPosition(188, 46), 1f, -.02f, 1);
            gsPlay.AddBGCoolGear(gsPlay.LoadTexture("GameObjects/gearCool2"), GridToCenterPosition(188, 46), 1f, -.02f, 1);
            gsPlay.AddBGWarmGear(gsPlay.LoadTexture("GameObjects/gearWarm3"), GridToCenterPosition(206, 44), 1f, -.022f, 1);
            gsPlay.AddBGCoolGear(gsPlay.LoadTexture("GameObjects/gearCool3"), GridToCenterPosition(206, 44), 1f, -.022f, 1);

            atmosphereLight = new Color(0, 0, 0);

            gsPlay.AddPointLight(gsPlay.LoadTexture("ShaderAssets/pointLight"), GridToPosition(240, 44), new Vector2(4));

            //gsPlay.AddPointLight(gsPlay.LoadTexture("ShaderAssets/pointLight"), GridToPosition(15, 10), new Vector2(5));
            player1Light = gsPlay.AddPointLight(gsPlay.LoadTexture("ShaderAssets/pointLight"), Vector2.Zero, new Vector2(2));
            player1Light.SetGlowing(2, 2.4f, 120);
            player2Light = gsPlay.AddPointLight(gsPlay.LoadTexture("ShaderAssets/pointLight"), Vector2.Zero, new Vector2(2));
            player2Light.SetGlowing(2, 2.4f, 120);

            //Doors and switches
            Door d1 = gsPlay.AddFadingDoor(Art.door, GridToPosition(new Point(47, 42)), OpenState.Closed);
            FlipSwitch s1 = gsPlay.AddOnSwitch(new EventTrigger(this, d1), gsPlay.LoadTexture("TestSprites/switch"), Level.GridToPosition(new Point(28, 54)));
            s1.SetPlayerMode(PlayerObjectMode.One);
            LightningChain lc1 = gsPlay.AddLightning(s1.position, s1.position + new Vector2(0, -208), Color.Orange);
            lc1.AddVertex(s1.position + new Vector2(384, -208));
            lc1.AddVertex(d1.position + new Vector2(0, 80));
            lc1.AddVertex(d1.position + new Vector2(0, 64));
            s1.AddEvent(new EventTrigger(this, lc1));
            lc1.defaultActive = true;
            lc1.SetActive(true);

            Door d2 = gsPlay.AddFadingDoor(Art.door, GridToPosition(new Point(108, 58)), OpenState.Closed);
            FlipSwitch s2 = gsPlay.AddOnSwitch(new EventTrigger(this, d2), gsPlay.LoadTexture("TestSprites/switch"), Level.GridToPosition(new Point(62, 57)));
            s2.SetPlayerMode(PlayerObjectMode.One);
            LightningChain lc2 = gsPlay.AddLightning(s2.position, s2.position + new Vector2(0, 112), Color.Orange);
            lc2.AddVertex(d2.position + new Vector2(0, 80));
            lc2.AddVertex(d2.position + new Vector2(0, 64));
            s2.AddEvent(new EventTrigger(this, lc2));
            lc2.defaultActive = true;
            lc2.SetActive(true);

            Door d3 = gsPlay.AddFadingDoor(Art.door, GridToPosition(new Point(100, 39)), OpenState.Closed);
            FlipSwitch s3 = gsPlay.AddOnSwitch(new EventTrigger(this, d3), gsPlay.LoadTexture("TestSprites/switch"), Level.GridToPosition(new Point(103, 40)));
            s3.SetPlayerMode(PlayerObjectMode.Two);
            LightningChain lc3 = gsPlay.AddLightning(s3.position, s3.position + new Vector2(0, 48), Color.Blue);
            lc3.AddVertex(d3.position + new Vector2(0, 80));
            lc3.AddVertex(d3.position + new Vector2(0, 64));
            s3.AddEvent(new EventTrigger(this, lc3));
            lc3.defaultActive = true;
            lc3.SetActive(true);

            Door d4 = gsPlay.AddFadingDoor(Art.door, GridToPosition(new Point(134, 23)), OpenState.Closed);
            FlipSwitch s4 = gsPlay.AddOnSwitch(new EventTrigger(this, d4), gsPlay.LoadTexture("TestSprites/switch"), Level.GridToPosition(new Point(120, 33)));
            s4.SetPlayerMode(PlayerObjectMode.One);
            LightningChain lc4 = gsPlay.AddLightning(s4.position, s4.position + new Vector2(0, -192), Color.Orange);
            lc4.AddVertex(s4.position + new Vector2(112, -240));
            lc4.AddVertex(d4.position + new Vector2(0, 80));
            lc4.AddVertex(d4.position + new Vector2(0, 64));
            s4.AddEvent(new EventTrigger(this, lc4));
            lc4.defaultActive = true;
            lc4.SetActive(true);

            Door d5 = gsPlay.AddFadingDoor(Art.door, GridToPosition(new Point(159, 23)), OpenState.Closed);
            FlipSwitch s5 = gsPlay.AddOnSwitch(new EventTrigger(this, d5), gsPlay.LoadTexture("TestSprites/switch"), Level.GridToPosition(new Point(156, 29)));
            LightningChain lc5 = gsPlay.AddLightning(s5.position, s5.position + new Vector2(0, -112), Color.Yellow);
            lc5.AddVertex(d5.position + new Vector2(0, 80));
            lc5.AddVertex(d5.position + new Vector2(0, 64));
            s5.AddEvent(new EventTrigger(this, lc5));
            lc5.defaultActive = true;
            lc5.SetActive(true);

            Door d6 = gsPlay.AddFadingDoor(Art.door, GridToPosition(new Point(164, 28)) + new Vector2(-16, 0), OpenState.Closed);
            FlipSwitch s6 = gsPlay.AddOnSwitch(new EventTrigger(this, d6), gsPlay.LoadTexture("TestSprites/switch"), Level.GridToPosition(new Point(162, 24)));
            LightningChain lc6 = gsPlay.AddLightning(s6.position, s6.position + new Vector2(0, 48), Color.Yellow);
            lc6.AddVertex(d6.position + new Vector2(0, -80));
            lc6.AddVertex(d6.position + new Vector2(0, -64));
            s6.AddEvent(new EventTrigger(this, lc6));
            lc6.defaultActive = true;
            lc6.SetActive(true);

            Door d7 = gsPlay.AddFadingDoor(Art.door, GridToPosition(new Point(188, 33)) + new Vector2(-16, 0), OpenState.Closed);
            FlipSwitch s7 = gsPlay.AddOnSwitch(new EventTrigger(this, d7), gsPlay.LoadTexture("TestSprites/switch"), Level.GridToPosition(new Point(192, 29)));
            LightningChain lc7 = gsPlay.AddLightning(s7.position, s7.position + new Vector2(0, 48), Color.Yellow);
            lc7.AddVertex(d7.position + new Vector2(0, -80));
            lc7.AddVertex(d7.position + new Vector2(0, -64));
            s7.AddEvent(new EventTrigger(this, lc7));
            lc7.defaultActive = true;
            lc7.SetActive(true);

            Door d8 = gsPlay.AddFadingDoor(Art.door, GridToPosition(new Point(178, 28)), OpenState.Closed);
            FlipSwitch s8 = gsPlay.AddOnSwitch(new EventTrigger(this, d8), gsPlay.LoadTexture("TestSprites/switch"), Level.GridToPosition(new Point(176, 29)));
            LightningChain lc8 = gsPlay.AddLightning(s8.position, s8.position + new Vector2(0, 48), Color.Yellow);
            lc8.AddVertex(d8.position + new Vector2(0, 80));
            lc8.AddVertex(d8.position + new Vector2(0, 64));
            s8.AddEvent(new EventTrigger(this, lc8));
            lc8.defaultActive = true;
            lc8.SetActive(true);

            Door d9 = gsPlay.AddFadingDoor(Art.door, GridToPosition(new Point(169, 33)) + new Vector2(-16, 0), OpenState.Closed);
            FlipSwitch s9 = gsPlay.AddOnSwitch(new EventTrigger(this, d9), gsPlay.LoadTexture("TestSprites/switch"), Level.GridToPosition(new Point(172, 39)));
            LightningChain lc9 = gsPlay.AddLightning(s9.position, s9.position + new Vector2(0, 48), Color.Yellow);
            lc9.AddVertex(s9.position + new Vector2(-112, 48));
            lc9.AddVertex(d9.position + new Vector2(0, 64));
            s9.AddEvent(new EventTrigger(this, lc9));
            lc9.defaultActive = true;
            lc9.SetActive(true);

            Door d10 = gsPlay.AddFadingDoor(Art.door, GridToPosition(new Point(174, 63)), OpenState.Closed);
            FlipSwitch s10 = gsPlay.AddOnSwitch(new EventTrigger(this, d10), gsPlay.LoadTexture("TestSprites/switch"), Level.GridToPosition(new Point(173, 69)));
            LightningChain lc10 = gsPlay.AddLightning(s10.position, s10.position + new Vector2(0, -112), Color.Yellow);
            lc10.AddVertex(d10.position + new Vector2(0, 80));
            lc10.AddVertex(d10.position + new Vector2(0, 64));
            s10.AddEvent(new EventTrigger(this, lc10));
            lc10.defaultActive = true;
            lc10.SetActive(true);

            Door d11 = gsPlay.AddFadingDoor(Art.door, GridToPosition(new Point(187, 73)), OpenState.Closed);
            FlipSwitch s11 = gsPlay.AddOnSwitch(new EventTrigger(this, d11), gsPlay.LoadTexture("TestSprites/switch"), Level.GridToPosition(new Point(173, 74)));
            LightningChain lc11 = gsPlay.AddLightning(s11.position, s11.position + new Vector2(0, 48), Color.Yellow);
            lc11.AddVertex(d11.position + new Vector2(0, 80));
            lc11.AddVertex(d11.position + new Vector2(0, 64));
            s11.AddEvent(new EventTrigger(this, lc11));
            lc11.defaultActive = true;
            lc11.SetActive(true);

            Door d12 = gsPlay.AddOpeningDoor(Art.door, GridToPosition(new Point(180, 73)), GridToPosition(new Point(180, 68)), OpenState.Closed);
            FlipSwitch s12 = gsPlay.AddMultiSwitch(new EventTrigger(this, d12), gsPlay.LoadTexture("TestSprites/switch"), Level.GridToPosition(new Point(173, 74)));
            LightningChain lc12 = gsPlay.AddLightning(s12.position, s12.position + new Vector2(0, -112), Color.Yellow);
            lc12.AddVertex(d12.position + new Vector2(0, 80));
            lc12.AddVertex(d12.position + new Vector2(0, 64));
            lc12.ConvertEndPointToTarget(d12);
            s12.AddEvent(new EventTrigger(this, lc12));

            Door d13 = gsPlay.AddFadingDoor(Art.door, GridToPosition(new Point(171, 78)), OpenState.Closed);
            FlipSwitch s13 = gsPlay.AddOnSwitch(new EventTrigger(this, d13), gsPlay.LoadTexture("TestSprites/switch"), Level.GridToPosition(new Point(174, 79)));
            LightningChain lc13 = gsPlay.AddLightning(s13.position, s13.position + new Vector2(0, 48), Color.Yellow);
            lc13.AddVertex(d13.position + new Vector2(0, 80));
            lc13.AddVertex(d13.position + new Vector2(0, 64));
            s13.AddEvent(new EventTrigger(this, lc13));
            lc13.defaultActive = true;
            lc13.SetActive(true);

            Door d14 = gsPlay.AddFadingDoor(Art.door, GridToPosition(new Point(197, 78)) + new Vector2(-16, 0), OpenState.Closed);
            FlipSwitch s14 = gsPlay.AddOnSwitch(new EventTrigger(this, d14), gsPlay.LoadTexture("TestSprites/switch"), Level.GridToPosition(new Point(199, 74)));
            LightningChain lc14 = gsPlay.AddLightning(s14.position, s14.position + new Vector2(0, 48), Color.Yellow);
            lc14.AddVertex(d14.position + new Vector2(0, -80));
            lc14.AddVertex(d14.position + new Vector2(0, -64));
            s14.AddEvent(new EventTrigger(this, lc14));
            lc14.defaultActive = true;
            lc14.SetActive(true);

            Door d15 = gsPlay.AddFadingDoor(Art.door, GridToPosition(new Point(202, 58)), OpenState.Closed);
            FlipSwitch s15 = gsPlay.AddOnSwitch(new EventTrigger(this, d15), gsPlay.LoadTexture("TestSprites/switch"), Level.GridToPosition(new Point(200, 64)));
            LightningChain lc15 = gsPlay.AddLightning(s15.position, s15.position + new Vector2(0, -112), Color.Yellow);
            lc15.AddVertex(d15.position + new Vector2(0, 80));
            lc15.AddVertex(d15.position + new Vector2(0, 64));
            s15.AddEvent(new EventTrigger(this, lc15));
            lc15.defaultActive = true;
            lc15.SetActive(true);

            Door d16 = gsPlay.AddFadingDoor(Art.door, GridToPosition(new Point(212, 63)), OpenState.Closed);
            FlipSwitch s16 = gsPlay.AddOnSwitch(new EventTrigger(this, d16), gsPlay.LoadTexture("TestSprites/switch"), Level.GridToPosition(new Point(209, 60)));
            LightningChain lc16 = gsPlay.AddLightning(s16.position, s16.position + new Vector2(0, 48), Color.Yellow);
            lc16.AddVertex(d16.position + new Vector2(0, -80));
            lc16.AddVertex(d16.position + new Vector2(0, -64));
            s16.AddEvent(new EventTrigger(this, lc16));
            lc16.defaultActive = true;
            lc16.SetActive(true);

            Door d17 = gsPlay.AddFadingDoor(gsPlay.LoadTexture("TestSprites/door2"), GridToPosition(new Point(211, 38)) + new Vector2(-16, 0), OpenState.Closed);
            Door d26 = gsPlay.AddFadingDoor(gsPlay.LoadTexture("TestSprites/door2"), GridToPosition(new Point(212, 38)) + new Vector2(-16, 0), OpenState.Closed);
            Door d27 = gsPlay.AddFadingDoor(gsPlay.LoadTexture("TestSprites/door2"), GridToPosition(new Point(213, 38)) + new Vector2(-16, 0), OpenState.Closed);
            Door d28 = gsPlay.AddFadingDoor(gsPlay.LoadTexture("TestSprites/door2"), GridToPosition(new Point(214, 38)) + new Vector2(-16, 0), OpenState.Closed);
            Door d29 = gsPlay.AddFadingDoor(gsPlay.LoadTexture("TestSprites/door2"), GridToPosition(new Point(215, 38)) + new Vector2(-16, 0), OpenState.Closed);
            Door d30 = gsPlay.AddFadingDoor(gsPlay.LoadTexture("TestSprites/door2"), GridToPosition(new Point(216, 38)) + new Vector2(-16, 0), OpenState.Closed);
            FlipSwitch s17 = gsPlay.AddOnSwitch(new EventTrigger(this, d17), gsPlay.LoadTexture("TestSprites/switch"), Level.GridToPosition(new Point(209, 44)));
            s17.AddEvent(new EventTrigger(this, d26));
            s17.AddEvent(new EventTrigger(this, d27));
            s17.AddEvent(new EventTrigger(this, d28));
            s17.AddEvent(new EventTrigger(this, d29));
            s17.AddEvent(new EventTrigger(this, d30));
            LightningChain lc17 = gsPlay.AddLightning(s17.position, s17.position + new Vector2(0, 48), Color.Yellow);
            lc17.AddVertex(s17.position + new Vector2(80, 48));
            lc17.AddVertex(s17.position + new Vector2(80, -112));
            lc17.AddVertex(s17.position + new Vector2(166, -112));
            s17.AddEvent(new EventTrigger(this, lc17));
            lc17.defaultActive = true;
            lc17.SetActive(true);

            Door d31 = gsPlay.AddFadingDoor(Art.door, GridToPosition(new Point(189, 48)), OpenState.Closed);
            FlipSwitch s18 = gsPlay.AddSwitch(new EventTrigger(this, d31), gsPlay.LoadTexture("TestSprites/switch"), Level.GridToPosition(new Point(214, 39)));
            LightningChain lc18 = gsPlay.AddLightning(s18.position, GridToCenterPosition(214, 40) + new Vector2(-16,0), Color.Red);
            lc18.AddVertex(GridToCenterPosition(211, 40));
            lc18.AddVertex(GridToCenterPosition(211, 45));
            lc18.AddVertex(GridToCenterPosition(200, 45) + new Vector2(-16, 0));
            lc18.AddVertex(GridToPosition(200, 46));
            s18.AddEvent(new EventTrigger(this, lc18));

            Door d32 = gsPlay.AddFadingDoor(Art.door, GridToPosition(new Point(200, 48)), OpenState.Closed);
            FlipSwitch s19 = gsPlay.AddSwitch(new EventTrigger(this, d32), gsPlay.LoadTexture("TestSprites/switch"), Level.GridToPosition(new Point(214, 39)));
            LightningChain lc19 = gsPlay.AddLightning(GridToCenterPosition(200, 45) + new Vector2(-16, 0), GridToCenterPosition(189, 45) + new Vector2(-16,0), Color.Red);
            lc19.AddVertex(GridToPosition(189, 46));
            s19.AddEvent(new EventTrigger(this, lc19));

            //static doors to block a players path
            Door d18 = gsPlay.AddFadingDoor(gsPlay.LoadTexture("TestSprites/door2"), GridToPosition(new Point(196, 33)) + new Vector2(-16, 0), OpenState.Closed);
            d18.SetPlayerMode(PlayerObjectMode.Two);
            Door d19 = gsPlay.AddFadingDoor(gsPlay.LoadTexture("TestSprites/door2"), GridToPosition(new Point(159, 48)) + new Vector2(-16, 0), OpenState.Closed);
            d19.SetPlayerMode(PlayerObjectMode.One);
            Door d20 = gsPlay.AddFadingDoor(gsPlay.LoadTexture("TestSprites/door2"), GridToPosition(new Point(197, 73)) + new Vector2(-16, 0), OpenState.Closed);
            d20.SetPlayerMode(PlayerObjectMode.Two);
            Door d21 = gsPlay.AddFadingDoor(gsPlay.LoadTexture("TestSprites/door2"), GridToPosition(new Point(212, 58)) + new Vector2(-16, 0), OpenState.Closed);
            d21.SetPlayerMode(PlayerObjectMode.Two);
            Door d22 = gsPlay.AddFadingDoor(gsPlay.LoadTexture("TestSprites/door2"), GridToPosition(new Point(212, 48)) + new Vector2(-16, 0), OpenState.Closed);
            d22.SetPlayerMode(PlayerObjectMode.One);
            Door d23 = gsPlay.AddFadingDoor(gsPlay.LoadTexture("TestSprites/door2"), GridToPosition(new Point(197, 78)) + new Vector2(-16, 0), OpenState.Closed);
            d23.SetPlayerMode(PlayerObjectMode.One);
            Door d24 = gsPlay.AddFadingDoor(gsPlay.LoadTexture("TestSprites/door2"), GridToPosition(new Point(164, 48)) + new Vector2(-16, 0), OpenState.Closed);
            d24.SetPlayerMode(PlayerObjectMode.One);
            gsPlay.AddSwitch(new EventTrigger(this, d24), gsPlay.LoadTexture("TestSprites/switch"), Level.GridToPosition(new Point(209, 60)));
            Door d25 = gsPlay.AddFadingDoor(gsPlay.LoadTexture("TestSprites/door2"), GridToPosition(new Point(159, 23)), OpenState.Closed);
            d25.SetPlayerMode(PlayerObjectMode.Two);

            //movables
            gsPlay.AddMoveable(gsPlay.LoadTexture("TestSprites/moveableMechanical"), Level.GridToPosition(new Point(74, 67)), .8f);

            //platforms used to block a players path
            MovingPlatform p1 = gsPlay.AddReversePlatform(gsPlay.LoadTexture("TestSprites/platform2a"), Level.GridToPosition(new Point(144, 26)) + new Vector2(0, -16), Level.GridToPosition(new Point(144, 26)) + new Vector2(0, -16));
            p1.SetPlayerMode(PlayerObjectMode.One);
            p1.SetCollisionBox(128, 32, Vector2.Zero);
            MovingPlatform p2 = gsPlay.AddReversePlatform(gsPlay.LoadTexture("TestSprites/platform2a"), Level.GridToPosition(new Point(166, 26)) + new Vector2(0, -16), Level.GridToPosition(new Point(166, 26)) + new Vector2(0, -16));
            p2.SetPlayerMode(PlayerObjectMode.One);
            p2.SetCollisionBox(128, 32, Vector2.Zero);
            MovingPlatform p3 = gsPlay.AddReversePlatform(gsPlay.LoadTexture("TestSprites/platform2a"), Level.GridToPosition(new Point(198, 26)) + new Vector2(0, -16), Level.GridToPosition(new Point(198, 26)) + new Vector2(0, -16));
            p3.SetPlayerMode(PlayerObjectMode.One);
            p3.SetCollisionBox(128, 32, Vector2.Zero);
            MovingPlatform p4 = gsPlay.AddReversePlatform(gsPlay.LoadTexture("TestSprites/platform2b"), Level.GridToPosition(new Point(208, 26)) + new Vector2(0, -16), Level.GridToPosition(new Point(208, 26)) + new Vector2(0, -16));
            p4.SetPlayerMode(PlayerObjectMode.Two);
            p4.SetCollisionBox(128, 32, Vector2.Zero);
            MovingPlatform p5 = gsPlay.AddReversePlatform(gsPlay.LoadTexture("TestSprites/platform2a"), Level.GridToPosition(new Point(193, 36)) + new Vector2(0, -16), Level.GridToPosition(new Point(193, 36)) + new Vector2(0, -16));
            p5.SetPlayerMode(PlayerObjectMode.One);
            p5.SetCollisionBox(128, 32, Vector2.Zero);
            MovingPlatform p6 = gsPlay.AddReversePlatform(gsPlay.LoadTexture("TestSprites/platform2b"), Level.GridToPosition(new Point(161, 51)) + new Vector2(0, -16), Level.GridToPosition(new Point(161, 51)) + new Vector2(0, -16));
            p6.SetPlayerMode(PlayerObjectMode.Two);
            p6.SetCollisionBox(128, 32, Vector2.Zero);
            MovingPlatform p7 = gsPlay.AddReversePlatform(gsPlay.LoadTexture("TestSprites/platform2a"), Level.GridToPosition(new Point(219, 61)) + new Vector2(0, -16), Level.GridToPosition(new Point(219, 61)) + new Vector2(0, -16));
            p7.SetPlayerMode(PlayerObjectMode.One);
            p7.SetCollisionBox(128, 32, Vector2.Zero);
            MovingPlatform p8 = gsPlay.AddReversePlatform(gsPlay.LoadTexture("TestSprites/platform2b"), Level.GridToPosition(new Point(214, 56)) + new Vector2(0, -16), Level.GridToPosition(new Point(214, 56)) + new Vector2(0, -16));
            p8.SetPlayerMode(PlayerObjectMode.Two);
            p8.SetCollisionBox(128, 32, Vector2.Zero);
            MovingPlatform p9 = gsPlay.AddReversePlatform(gsPlay.LoadTexture("TestSprites/platform2b"), Level.GridToPosition(new Point(219, 51)) + new Vector2(0, -16), Level.GridToPosition(new Point(219, 51)) + new Vector2(0, -16));
            p9.SetPlayerMode(PlayerObjectMode.Two);
            p9.SetCollisionBox(128, 32, Vector2.Zero);
            MovingPlatform p10 = gsPlay.AddReversePlatform(gsPlay.LoadTexture("TestSprites/platform2a"), Level.GridToPosition(new Point(219, 56)) + new Vector2(0, -16), Level.GridToPosition(new Point(219, 56)) + new Vector2(0, -16));
            p10.SetPlayerMode(PlayerObjectMode.One);
            p10.SetCollisionBox(128, 32, Vector2.Zero);
            MovingPlatform p11 = gsPlay.AddReversePlatform(gsPlay.LoadTexture("TestSprites/platform2a"), Level.GridToPosition(new Point(214, 51)) + new Vector2(0, -16), Level.GridToPosition(new Point(214, 51)) + new Vector2(0, -16));
            p11.SetPlayerMode(PlayerObjectMode.One);
            p11.SetCollisionBox(128, 32, Vector2.Zero);
            MovingPlatform p12 = gsPlay.AddReversePlatform(gsPlay.LoadTexture("TestSprites/platform2b"), Level.GridToPosition(new Point(56, 69)) + new Vector2(0, -16), Level.GridToPosition(new Point(56, 69)) + new Vector2(0, -16));
            p12.SetPlayerMode(PlayerObjectMode.Two);
            p12.SetCollisionBox(128, 32, Vector2.Zero);
            MovingPlatform p13 = gsPlay.AddReversePlatform(gsPlay.LoadTexture("TestSprites/platform2b"), Level.GridToPosition(new Point(60, 69)) + new Vector2(0, -16), Level.GridToPosition(new Point(59, 69)) + new Vector2(0, -16));
            p13.SetPlayerMode(PlayerObjectMode.Two);
            p13.SetCollisionBox(128, 32, Vector2.Zero);
            MovingPlatform p14 = gsPlay.AddReversePlatform(gsPlay.LoadTexture("TestSprites/platform2b"), Level.GridToPosition(new Point(64, 69)) + new Vector2(0, -16), Level.GridToPosition(new Point(62, 69)) + new Vector2(0, -16));
            p14.SetPlayerMode(PlayerObjectMode.Two);
            p14.SetCollisionBox(128, 32, Vector2.Zero);
            MovingPlatform p16 = gsPlay.AddReversePlatform(gsPlay.LoadTexture("TestSprites/platform2b"), Level.GridToPosition(new Point(89, 39)) + new Vector2(0, -16), Level.GridToPosition(new Point(89, 39)) + new Vector2(0, -16));
            p16.SetPlayerMode(PlayerObjectMode.Two);
            p16.SetCollisionBox(128, 32, Vector2.Zero);
            MovingPlatform p17 = gsPlay.AddReversePlatform(gsPlay.LoadTexture("TestSprites/platform2b"), Level.GridToPosition(new Point(85, 38)) + new Vector2(0, -16), Level.GridToPosition(new Point(86, 38)) + new Vector2(0, -16));
            p17.SetPlayerMode(PlayerObjectMode.Two);
            p17.SetCollisionBox(128, 32, Vector2.Zero);

            //Lights
            //15,58
            LightConsole console1 = gsPlay.AddLightConsole(gsPlay.LoadTexture("TestSprites/LightConsole"), GridToPosition(15, 58));
            //LightConsole console1 = gsPlay.AddLightConsole(gsPlay.LoadTexture("TestSprites/LightConsole"), GridToPosition(140, 24));
            console1.AddLight(player1Light);
            console1.SetPlayerMode(PlayerObjectMode.One);
            LightConsole console2 = gsPlay.AddLinkedLightConsole(console1, console1.texture, GridToPosition(0, 0));
            console2.AddLight(player2Light);
            console2.SetPlayerMode(PlayerObjectMode.One);

            LightConsole console3 = gsPlay.AddLightConsole(gsPlay.LoadTexture("TestSprites/LightConsole"), GridToPosition(30, 45));
            LightConsole console4 = gsPlay.AddLinkedLightConsole(console3, console3.texture, GridToPosition(0, 0));

            LightConsole console5 = gsPlay.AddLightConsole(gsPlay.LoadTexture("TestSprites/LightConsole"), GridToPosition(51, 67));
            LightConsole console6 = gsPlay.AddLinkedLightConsole(console5, console5.texture, GridToPosition(0, 0));

            LightConsole console7 = gsPlay.AddLightConsole(gsPlay.LoadTexture("TestSprites/LightConsole"), GridToPosition(94, 59));
            gsPlay.AddLinkedLightConsole(console7, console7.texture, GridToPosition(0, 0));

            LightConsole console8 = gsPlay.AddLightConsole(gsPlay.LoadTexture("TestSprites/LightConsole"), GridToPosition(105, 52));
            gsPlay.AddLinkedLightConsole(console8, console8.texture, GridToPosition(0, 0));

            LightConsole console9 = gsPlay.AddLightConsole(gsPlay.LoadTexture("TestSprites/LightConsole"), GridToPosition(129, 23));
            LightConsole console9a = gsPlay.AddLinkedLightConsole(console9, console9.texture, GridToPosition(0, 0));
            //console9.AddLight(player1Light);
            //console9a.AddLight(player2Light);

            LightConsole console10 = gsPlay.AddLightConsole(gsPlay.LoadTexture("TestSprites/LightConsole"), GridToPosition(147, 24));
            console10.SetPlayerMode(PlayerObjectMode.One);
            LightConsole console11 = gsPlay.AddLinkedLightConsole(console10, console10.texture, GridToPosition(147, 29));
            console11.SetPlayerMode(PlayerObjectMode.Two);
            LightningChain clc1 = gsPlay.AddLightning(console10.position, console11.position, Color.White);
            console10.AddEvent(new EventTrigger(this, clc1));
            console11.AddEvent(new EventTrigger(this, clc1));

            LightConsole console12 = gsPlay.AddLightConsole(gsPlay.LoadTexture("TestSprites/LightConsole"), GridToPosition(205, 24));
            console12.SetPlayerMode(PlayerObjectMode.Two);
            LightConsole console13 = gsPlay.AddLinkedLightConsole(console12, console12.texture, GridToPosition(205, 39));
            console13.SetPlayerMode(PlayerObjectMode.One);
            LightningChain clc2 = gsPlay.AddLightning(console12.position, console13.position, Color.White);
            console12.AddEvent(new EventTrigger(this, clc2));
            console13.AddEvent(new EventTrigger(this, clc2));

            LightConsole console14 = gsPlay.AddLightConsole(gsPlay.LoadTexture("TestSprites/LightConsole"), GridToPosition(191, 34));
            console14.SetPlayerMode(PlayerObjectMode.One);
            LightConsole console15 = gsPlay.AddLinkedLightConsole(console14, console14.texture, GridToPosition(191, 39));
            console15.SetPlayerMode(PlayerObjectMode.Two);
            LightningChain clc3 = gsPlay.AddLightning(console14.position, console15.position, Color.White);
            console14.AddEvent(new EventTrigger(this, clc3));
            console15.AddEvent(new EventTrigger(this, clc3));

            LightConsole console16 = gsPlay.AddLightConsole(gsPlay.LoadTexture("TestSprites/LightConsole"), GridToPosition(157, 69));
            console16.SetPlayerMode(PlayerObjectMode.Two);
            LightConsole console17 = gsPlay.AddLinkedLightConsole(console16, console16.texture, GridToPosition(162, 64));
            console17.SetPlayerMode(PlayerObjectMode.One);
            LightningChain clc4 = gsPlay.AddLightning(console16.position, console17.position, Color.White);
            console16.AddEvent(new EventTrigger(this, clc4));
            console17.AddEvent(new EventTrigger(this, clc4));

            LightConsole console18 = gsPlay.AddLightConsole(gsPlay.LoadTexture("TestSprites/LightConsole"), GridToPosition(190, 79));
            console18.SetPlayerMode(PlayerObjectMode.Two);
            LightConsole console19 = gsPlay.AddLinkedLightConsole(console18, console18.texture, GridToPosition(185, 84));
            console19.SetPlayerMode(PlayerObjectMode.One);
            LightningChain clc5 = gsPlay.AddLightning(console18.position, console19.position, Color.White);
            console18.AddEvent(new EventTrigger(this, clc5));
            console19.AddEvent(new EventTrigger(this, clc5));

            LightConsole console20 = gsPlay.AddLightConsole(gsPlay.LoadTexture("TestSprites/LightConsole"), GridToPosition(189, 69));
            console20.SetPlayerMode(PlayerObjectMode.One);
            LightConsole console21 = gsPlay.AddLinkedLightConsole(console20, console20.texture, GridToPosition(209, 69));
            console21.SetPlayerMode(PlayerObjectMode.Two);
            LightningChain clc6 = gsPlay.AddLightning(console20.position, console21.position, Color.White);
            console20.AddEvent(new EventTrigger(this, clc6));
            console21.AddEvent(new EventTrigger(this, clc6));

            LightConsole console22 = gsPlay.AddLightConsole(gsPlay.LoadTexture("TestSprites/LightConsole"), GridToPosition(212, 39));
            LightConsole console23 = gsPlay.AddLinkedLightConsole(console22, console22.texture, GridToPosition(198, 49));
            LightningChain clc7 = gsPlay.AddLightning(console22.position, console23.position, Color.White);
            console22.AddEvent(new EventTrigger(this, clc1));
            console23.AddEvent(new EventTrigger(this, clc1));

            AudioManager.PlayMusic("Cave");
        }
Example #3
0
        public Level3(GSPlay gsPlay)
            : base(gsPlay)
        {
            levelDataTexture = gsPlay.LoadTexture("Levels/level3Data");

            player1Pos = GridToPosition(23, 150);
            player2Pos = GridToPosition(20, 150);

            //player1Pos = GridToPosition(147, 100);
            //player2Pos = player1Pos;

            portalPos = GridToPosition(492, 32);
            pItemPos = GridToPosition(152, 90) + new Vector2(-16, 0);

            renderCollision = false;

            SetupLevel();

            for (int x = 1; x <= 17; x++)
            {
                for (int y = 1; y <= 6; y++)
                {
                    string fgName = "LevelTiles/Mountain/mountainCoolFG" + y + "x" + x;
                    if (File.Exists("Content/" + fgName + ".xnb"))
                    {
                        SpriteIMG fg = gsPlay.AddFrontFGTile(gsPlay.LoadTexture(fgName), new Vector2(1024 * (x - 1), 1024 * (y - 1)));
                        fg.origin = Vector2.Zero;
                        fg.SetPlayerMode(PlayerObjectMode.Two);

                    }

                    string bgName = "LevelTiles/Mountain/mountainCoolBG" + y + "x" + x;
                    if (File.Exists("Content/" + bgName + ".xnb"))
                    {
                        SpriteIMG bg = gsPlay.AddBackFGTile(gsPlay.LoadTexture(bgName), new Vector2(1024 * (x - 1), 1024 * (y - 1)));
                        bg.origin = Vector2.Zero;
                        bg.SetPlayerMode(PlayerObjectMode.Two);
                    }

                }
            }

            for (int x = 1; x <= 17; x++)
            {
                for (int y = 1; y <= 6; y++)
                {
                    string fgName = "LevelTiles/Mountain/mountainWarmFG" + y + "x" + x;
                    if (File.Exists("Content/" + fgName + ".xnb"))
                    {
                        SpriteIMG fg = gsPlay.AddFrontFGTile(gsPlay.LoadTexture(fgName), new Vector2(1024 * (x - 1), 1024 * (y - 1)));
                        fg.origin = Vector2.Zero;
                        fg.SetPlayerMode(PlayerObjectMode.One);

                    }

                    string bgName = "LevelTiles/Mountain/mountainWarmBG" + y + "x" + x;
                    if (File.Exists("Content/" + bgName + ".xnb"))
                    {
                        SpriteIMG bg = gsPlay.AddBackFGTile(gsPlay.LoadTexture(bgName), new Vector2(1024 * (x - 1), 1024 * (y - 1)));
                        bg.origin = Vector2.Zero;
                        bg.SetPlayerMode(PlayerObjectMode.One);
                    }

                }
            }

            rightLimit = levelWidth - 32;

            Vector2 bgPosition = new Vector2(-400, -400);
            for (int x = 0; x < 3; x++)
            {
                for (int y = 0; y < 2; y++)
                {
                    SpriteIMG bg1 = new SpriteIMG(gsPlay.LoadTexture("BGs/mountainBackdropBase1"), bgPosition);
                    bg1.SetPlayerMode(PlayerObjectMode.One);
                    gsPlay.AddParallax(bg1, .1f);
                    SpriteIMG bg2 = new SpriteIMG(gsPlay.LoadTexture("BGs/mountainBackdropBase2"), bgPosition);
                    bg2.SetPlayerMode(PlayerObjectMode.Two);
                    gsPlay.AddParallax(bg2, .1f);

                    bgPosition.Y += 1024;
                }
                bgPosition.Y = -400;
                bgPosition.X += 1024;
            }

            bgPosition = new Vector2(-300, -300);
            for (int x = 0; x < 4; x++)
            {
                for (int y = 0; y < 2; y++)
                {
                    SpriteIMG bg1 = new SpriteIMG(gsPlay.LoadTexture("BGs/mountainBackdropOverlay1"), bgPosition);
                    bg1.SetPlayerMode(PlayerObjectMode.One);
                    gsPlay.AddParallax(bg1, .2f);
                    SpriteIMG bg2 = new SpriteIMG(gsPlay.LoadTexture("BGs/mountainBackdropOverlay2"), bgPosition);
                    bg2.SetPlayerMode(PlayerObjectMode.Two);
                    gsPlay.AddParallax(bg2, .2f);

                    bgPosition.Y += 1024;
                }

                bgPosition.Y = -300;
                bgPosition.X += 1024;
            }

            bgPosition = new Vector2(-300, -300);
            for (int x = 0; x < 9; x++)
            {
                for (int y = 0; y < 3; y++)
                {
                    SpriteIMG bg1 = new SpriteIMG(gsPlay.LoadTexture("BGs/mountainMatte1"), bgPosition);
                    bg1.SetPlayerMode(PlayerObjectMode.One);
                    gsPlay.AddParallax(bg1, .5f);
                    SpriteIMG bg2 = new SpriteIMG(gsPlay.LoadTexture("BGs/mountainMatte2"), bgPosition);
                    bg2.SetPlayerMode(PlayerObjectMode.Two);
                    gsPlay.AddParallax(bg2, .5f);

                    bgPosition.Y += 1024;
                }

                bgPosition.Y = -300;
                bgPosition.X += 1024;
            }

            gsPlay.AddBGWarmGear(gsPlay.LoadTexture("GameObjects/gearWarm2"), GridToCenterPosition(149, 72), .75f, -.02f, 1);
            gsPlay.AddBGCoolGear(gsPlay.LoadTexture("GameObjects/gearCool2"), GridToCenterPosition(149, 72), .75f, -.02f, 1);
            gsPlay.AddBGWarmGear(gsPlay.LoadTexture("GameObjects/gearWarm1"), GridToCenterPosition(153, 77), 1f, .015f, 1);
            gsPlay.AddBGCoolGear(gsPlay.LoadTexture("GameObjects/gearCool1"), GridToCenterPosition(153, 77), 1f, .015f, 1);
            gsPlay.AddBGWarmGear(gsPlay.LoadTexture("GameObjects/gearWarm3"), GridToCenterPosition(149, 82), 1.25f, -.01f, 1);
            gsPlay.AddBGCoolGear(gsPlay.LoadTexture("GameObjects/gearCool3"), GridToCenterPosition(149, 82), 1.25f, -.01f, 1);

            //part1
            Door d1 = gsPlay.AddFadingDoor(Art.door, GridToPosition(new Point(137, 101)) + new Vector2(-16, 0), OpenState.Closed);
            FlipSwitch s1 = gsPlay.AddOnSwitch(new EventTrigger(this, d1), gsPlay.LoadTexture("TestSprites/switch"), Level.GridToPosition(new Point(144, 111)));
            s1.SetPlayerMode(PlayerObjectMode.Two);
            Door bd1 = gsPlay.AddFadingDoor(Art.door, GridToPosition(new Point(137, 101)) + new Vector2(-16, 0), OpenState.Closed);
            bd1.SetPlayerMode(PlayerObjectMode.Two);
            LightningChain lc1 = gsPlay.AddLightning(s1.position, s1.position + new Vector2(0, -240), Color.LightBlue);
            lc1.AddVertex(d1.position + new Vector2(0, 80));
            lc1.AddVertex(d1.position + new Vector2(0, 64));
            s1.AddEvent(new EventTrigger(this, lc1));
            lc1.defaultActive = true;
            lc1.SetActive(true);

            Door d2 = gsPlay.AddFadingDoor(Art.platform, GridToPosition(new Point(157, 107)) + new Vector2(-16, -16), OpenState.Closed);
            FlipSwitch s2 = gsPlay.AddOnSwitch(new EventTrigger(this, d2), gsPlay.LoadTexture("TestSprites/switch"), Level.GridToPosition(new Point(148, 101)));
            s2.SetPlayerMode(PlayerObjectMode.One);
            Door bd2 = gsPlay.AddFadingDoor(Art.platform, GridToPosition(new Point(157, 107)) + new Vector2(-16, -16), OpenState.Closed);
            bd2.SetPlayerMode(PlayerObjectMode.One);
            LightningChain lc2 = gsPlay.AddLightning(s2.position, s2.position + new Vector2(0, 80), Color.Red);
            lc2.AddVertex(s2.position + new Vector2(96, 80));
            lc2.AddVertex(d2.position + new Vector2(-80, 0));
            lc2.AddVertex(d2.position + new Vector2(-48, 0));
            s2.AddEvent(new EventTrigger(this, lc2));
            lc2.defaultActive = true;
            lc2.SetActive(true);

            //part2
            Door d3 = gsPlay.AddFadingDoor(Art.door, GridToPosition(new Point(249, 87)), OpenState.Closed);
            FlipSwitch s3 = gsPlay.AddSwitch(new EventTrigger(this, d3), gsPlay.LoadTexture("TestSprites/switch"), Level.GridToPosition(new Point(247, 88)) + new Vector2(-16, 0));
            s3.SetPlayerMode(PlayerObjectMode.Two);
            Door bd3 = gsPlay.AddFadingDoor(Art.door, GridToPosition(new Point(249, 87)), OpenState.Closed);
            bd3.SetPlayerMode(PlayerObjectMode.Two);
            LightningChain lc3 = gsPlay.AddLightning(s3.position, d3.position, Color.Orange);
            s3.AddEvent(new EventTrigger(this, lc3));

            Door d4 = gsPlay.AddFadingDoor(Art.platform, GridToPosition(new Point(247, 85)) + new Vector2(-16, -16), OpenState.Closed);
            FlipSwitch s4 = gsPlay.AddSwitch(new EventTrigger(this, d4), gsPlay.LoadTexture("TestSprites/switch"), Level.GridToPosition(new Point(252, 88)) + new Vector2(-16, 0));
            s2.SetPlayerMode(PlayerObjectMode.One);
            Door bd4 = gsPlay.AddFadingDoor(Art.platform, GridToPosition(new Point(247, 85)) + new Vector2(-16, -16), OpenState.Closed);
            bd4.SetPlayerMode(PlayerObjectMode.One);
            lc3.AddVertex(s4.position);
            LightningChain lc4 = gsPlay.AddLightning(s4.position, d4.position, Color.Orange);
            s4.AddEvent(new EventTrigger(this, lc4));

            Door d5 = gsPlay.AddFadingDoor(Art.platform, GridToPosition(new Point(252, 85)) + new Vector2(-16, -16), OpenState.Closed);
            FlipSwitch s5 = gsPlay.AddSwitch(new EventTrigger(this, d5), gsPlay.LoadTexture("TestSprites/switch"), Level.GridToPosition(new Point(247, 82)) + new Vector2(-16, 0));
            lc4.AddVertex(s5.position);
            LightningChain lc5 = gsPlay.AddLightning(s5.position, d5.position, Color.Orange);
            s5.AddEvent(new EventTrigger(this, lc5));

            Door d6 = gsPlay.AddFadingDoor(Art.platform, GridToPosition(new Point(247, 80)) + new Vector2(-16, -16), OpenState.Closed);
            FlipSwitch s6 = gsPlay.AddSwitch(new EventTrigger(this, d6), gsPlay.LoadTexture("TestSprites/switch"), Level.GridToPosition(new Point(252, 78)) + new Vector2(-16, 0));
            lc5.AddVertex(s6.position);
            LightningChain lc6 = gsPlay.AddLightning(s6.position, d6.position, Color.Orange);
            s6.AddEvent(new EventTrigger(this, lc6));

            Door d7 = gsPlay.AddFadingDoor(Art.platform, GridToPosition(new Point(252, 76)) + new Vector2(-16, -16), OpenState.Closed);
            FlipSwitch s7 = gsPlay.AddSwitch(new EventTrigger(this, d7), gsPlay.LoadTexture("TestSprites/switch"), Level.GridToPosition(new Point(247, 74)) + new Vector2(-16, 0));
            lc6.AddVertex(s7.position);
            LightningChain lc7 = gsPlay.AddLightning(s7.position, d7.position, Color.Orange);
            s7.AddEvent(new EventTrigger(this, lc7));

            Door d8 = gsPlay.AddFadingDoor(Art.platform, GridToPosition(new Point(247, 72)) + new Vector2(-16, -16), OpenState.Closed);
            FlipSwitch s8 = gsPlay.AddSwitch(new EventTrigger(this, d8), gsPlay.LoadTexture("TestSprites/switch"), Level.GridToPosition(new Point(252, 70)) + new Vector2(-16, 0));
            lc7.AddVertex(s8.position);
            LightningChain lc8 = gsPlay.AddLightning(s8.position, d8.position, Color.Orange);
            s8.AddEvent(new EventTrigger(this, lc8));

            Door d9 = gsPlay.AddFadingDoor(Art.platform, GridToPosition(new Point(252, 68)) + new Vector2(-16, -16), OpenState.Closed);
            FlipSwitch s9 = gsPlay.AddSwitch(new EventTrigger(this, d9), gsPlay.LoadTexture("TestSprites/switch"), Level.GridToPosition(new Point(247, 64)) + new Vector2(-16, 0));
            lc8.AddVertex(s9.position);
            LightningChain lc9 = gsPlay.AddLightning(s9.position, d9.position, Color.Orange);
            s9.AddEvent(new EventTrigger(this, lc9));

            //part3

            Door d10 = gsPlay.AddFadingDoor(Art.door, GridToPosition(new Point(327, 68)) + new Vector2(-16, 0), OpenState.Closed);
            FlipSwitch s10 = gsPlay.AddSwitch(new EventTrigger(this, d10), gsPlay.LoadTexture("TestSprites/switch"), Level.GridToPosition(new Point(330, 61)));
            d10.SetPlayerMode(PlayerObjectMode.One);
            s10.SetPlayerMode(PlayerObjectMode.Two);
            LightningChain lc10 = gsPlay.AddLightning(s10.position, d10.position, Color.Orange);
            s10.AddEvent(new EventTrigger(this, lc10));

            Door d11 = gsPlay.AddFadingDoor(Art.door, GridToPosition(new Point(334, 62)) + new Vector2(-16, 0), OpenState.Closed);
            FlipSwitch s11 = gsPlay.AddSwitch(new EventTrigger(this, d11), gsPlay.LoadTexture("TestSprites/switch"), Level.GridToPosition(new Point(337, 68)));
            d11.SetPlayerMode(PlayerObjectMode.Two);
            s11.SetPlayerMode(PlayerObjectMode.One);
            lc10.AddVertex(s11.position);
            LightningChain lc11 = gsPlay.AddLightning(s11.position, d11.position, Color.Orange);
            s11.AddEvent(new EventTrigger(this, lc11));

            Door d12 = gsPlay.AddFadingDoor(Art.door, GridToPosition(new Point(341, 68)) + new Vector2(-16, 0), OpenState.Closed);
            FlipSwitch s12 = gsPlay.AddSwitch(new EventTrigger(this, d12), gsPlay.LoadTexture("TestSprites/switch"), Level.GridToPosition(new Point(344, 61)));
            d12.SetPlayerMode(PlayerObjectMode.One);
            s12.SetPlayerMode(PlayerObjectMode.Two);
            lc11.AddVertex(s12.position);
            LightningChain lc12 = gsPlay.AddLightning(s12.position, d12.position, Color.Orange);
            s12.AddEvent(new EventTrigger(this, lc12));

            Door d13 = gsPlay.AddFadingDoor(Art.door, GridToPosition(new Point(348, 62)) + new Vector2(-16, 0), OpenState.Closed);
            FlipSwitch s13 = gsPlay.AddSwitch(new EventTrigger(this, d13), gsPlay.LoadTexture("TestSprites/switch"), Level.GridToPosition(new Point(351, 68)));
            d13.SetPlayerMode(PlayerObjectMode.Two);
            s13.SetPlayerMode(PlayerObjectMode.One);
            lc12.AddVertex(s13.position);
            LightningChain lc13 = gsPlay.AddLightning(s13.position, d13.position, Color.Orange);
            s13.AddEvent(new EventTrigger(this, lc13));

            //part4
            MovingPlatform mp1 = gsPlay.AddReversePlatform(Art.platform, Level.GridToPosition(new Point(399, 25)) + new Vector2(0, -16), Level.GridToPosition(new Point(407, 25)) + new Vector2(0, -16));
            mp1.SetPlayerMode(PlayerObjectMode.One);
            FlipSwitch ms1 = gsPlay.AddSwitch(new EventTrigger(this, mp1), gsPlay.LoadTexture("TestSprites/switch"), Level.GridToPosition(new Point(403, 29)));
            ms1.SetPlayerMode(PlayerObjectMode.Two);
            LightningChain lc114 = gsPlay.AddLightning(ms1.position, mp1.position, Color.LightBlue);
            lc114.ConvertEndPointToTarget(mp1);
            ms1.AddEvent(new EventTrigger(this, lc114));

            Door d14 = gsPlay.AddFadingDoor(Art.door, GridToPosition(new Point(393, 9)) + new Vector2(-16, 0), OpenState.Closed);
            FlipSwitch s14 = gsPlay.AddSwitch(new EventTrigger(this, d14), gsPlay.LoadTexture("TestSprites/switch"), Level.GridToPosition(new Point(398, 21)));
            LightningChain lc14 = gsPlay.AddLightning(s14.position, GridToPosition(393, 21), Color.Red);
            lc14.AddVertex(d14.position);
            s14.AddEvent(new EventTrigger(this, lc14));

            Door d15 = gsPlay.AddFadingDoor(Art.platform, GridToPosition(new Point(366, 33)) + new Vector2(0, -16), OpenState.Closed);
            Button s15 = gsPlay.AddButton(new EventTrigger(this, d15), 1, gsPlay.LoadTexture("TestSprites/button"), GridToPosition(new Point(370, 32)));
            LightningChain lc15 = gsPlay.AddLightning(s15.position, GridToPosition(370, 33) + new Vector2(0, -16), Color.Orange);
            lc15.AddVertex(GridToPosition(367, 33) + new Vector2(0, -16));
            s15.AddEvent(new EventTrigger(this, lc15));
            lc15.defaultActive = true;
            lc15.SetActive(true);

            Door d16 = gsPlay.AddFadingDoor(Art.platform, GridToPosition(new Point(444, 69)) + new Vector2(0, -16), OpenState.Closed);
            FlipSwitch s16 = gsPlay.AddSwitch(new EventTrigger(this, d16), gsPlay.LoadTexture("TestSprites/switch"), Level.GridToPosition(new Point(440, 71)));
            s16.SetPlayerMode(PlayerObjectMode.Two);
            LightningChain lc16 = gsPlay.AddLightning(s16.position, GridToPosition(440, 69) + new Vector2(0, -16), Color.Orange);
            lc16.AddVertex(GridToPosition(443, 69) + new Vector2(0, -16));
            s16.AddEvent(new EventTrigger(this, lc16));
            lc16.defaultActive = true;
            lc16.SetActive(true);

            gsPlay.AddBouncyBall(.5f, gsPlay.LoadTexture("TestSprites/pickUp"), GridToPosition(new Point(426, 68))).selfIlluminating = true;
            gsPlay.AddMoveable(gsPlay.LoadTexture("TestSprites/moveable"), Level.GridToPosition(new Point(429, 46)), .8f);
            gsPlay.AddMoveable(gsPlay.LoadTexture("TestSprites/moveable"), Level.GridToPosition(new Point(388, 10)), .8f);
            gsPlay.AddMoveable(gsPlay.LoadTexture("TestSprites/moveable"), Level.GridToPosition(new Point(366, 31)), .8f);
            gsPlay.AddMoveable(gsPlay.LoadTexture("TestSprites/moveable"), Level.GridToPosition(new Point(443, 71 )), .8f);

            //secret
            Door mp2 = gsPlay.AddFadingDoor(Art.platform, GridToPosition(new Point(152, 69)) + new Vector2(-16, -16), OpenState.Closed);
            FlipSwitch ms2 = gsPlay.AddSwitch(new EventTrigger(this, mp2), gsPlay.LoadTexture("TestSprites/switch"), Level.GridToPosition(new Point(152, 67)) + new Vector2(-16, 0));
            ms2.pressureCooker = true;
            ms2.SetPlayerMode(PlayerObjectMode.One);
            LightningChain lc17 = gsPlay.AddLightning(ms2.position, mp2.position + new Vector2(64, 0), Color.LightBlue);
            ms2.AddEvent(new EventTrigger(this, lc17));

            Door mp3 = gsPlay.AddFadingDoor(Art.platform, GridToPosition(new Point(152, 69)) + new Vector2(-16, -16), OpenState.Closed);
            FlipSwitch ms3 = gsPlay.AddSwitch(new EventTrigger(this, mp3), gsPlay.LoadTexture("TestSprites/switch"), Level.GridToPosition(new Point(152, 67)) + new Vector2(-16, 0));
            ms3.pressureCooker = true;
            ms3.SetPlayerMode(PlayerObjectMode.Two);
            LightningChain lc18 = gsPlay.AddLightning(ms3.position, mp3.position + new Vector2(-64, 0), Color.Red);
            ms3.AddEvent(new EventTrigger(this, lc18));

            Door bd5 = gsPlay.AddFadingDoor(Art.door, GridToPosition(new Point(150, 66)) + new Vector2(-16, 0), OpenState.Closed);
            bd5.SetPlayerMode(PlayerObjectMode.One);
            Door bd6 = gsPlay.AddFadingDoor(Art.door, GridToPosition(new Point(154, 66)) + new Vector2(-16, 0), OpenState.Closed);
            bd6.SetPlayerMode(PlayerObjectMode.Two);

            AudioManager.PlayMusic("Mountain");
        }
Example #4
0
        public Level2(GSPlay gsPlay)
            : base(gsPlay)
        {
            levelDataTexture = gsPlay.LoadTexture("Levels/level2Data");

            player1Pos = GridToPosition(26, 85);
            player2Pos = GridToPosition(22, 85);

            //player1Pos = GridToPosition(339, 52);
            //player2Pos = player1Pos;

            portalPos = GridToPosition(457, 67);
            pItemPos = GridToPosition(241, 79);

            renderCollision = false;

            SetupLevel();

            Vector2 bgPosition = new Vector2(-400, -350);
            for (int x = 0; x < 3; x++)
            {
                SpriteIMG bg1 = new SpriteIMG(gsPlay.LoadTexture("BGs/forestBackdropBase1"), bgPosition);
                bg1.SetPlayerMode(PlayerObjectMode.One);
                gsPlay.AddParallax(bg1, .1f);
                SpriteIMG bg2 = new SpriteIMG(gsPlay.LoadTexture("BGs/forestBackdropBase2"), bgPosition);
                bg2.SetPlayerMode(PlayerObjectMode.Two);
                gsPlay.AddParallax(bg2, .1f);

                bgPosition.X += 1024;
            }

            bgPosition = new Vector2(-300, -200);
            for (int x = 0; x < 4; x++)
            {
                SpriteIMG bg1 = new SpriteIMG(gsPlay.LoadTexture("BGs/forestBackdropOverlay1"), bgPosition);
                bg1.SetPlayerMode(PlayerObjectMode.One);
                gsPlay.AddParallax(bg1, .2f);
                SpriteIMG bg2 = new SpriteIMG(gsPlay.LoadTexture("BGs/forestBackdropOverlay2"), bgPosition);
                bg2.SetPlayerMode(PlayerObjectMode.Two);
                gsPlay.AddParallax(bg2, .2f);

                bgPosition.X += 1024;
            }

            bgPosition = new Vector2(-300, -300);
            for (int x = 0; x < 8; x++)
            {
                for (int y = 0; y < 2; y++)
                {
                    SpriteIMG bg1 = new SpriteIMG(gsPlay.LoadTexture("BGs/forestMatte1"), bgPosition);
                    bg1.SetPlayerMode(PlayerObjectMode.One);
                    gsPlay.AddParallax(bg1, .5f);
                    SpriteIMG bg2 = new SpriteIMG(gsPlay.LoadTexture("BGs/forestMatte2"), bgPosition);
                    bg2.SetPlayerMode(PlayerObjectMode.Two);
                    gsPlay.AddParallax(bg2, .5f);

                    bgPosition.Y += 1024;
                }

                bgPosition.Y = -300;
                bgPosition.X += 1024;
            }

            gsPlay.AddBGWarmGear(gsPlay.LoadTexture("GameObjects/gearWarm1"), GridToCenterPosition(239, 76), .75f, .02f, 1);
            gsPlay.AddBGCoolGear(gsPlay.LoadTexture("GameObjects/gearCool1"), GridToCenterPosition(239, 76), .75f, .02f, 1);
            gsPlay.AddBGWarmGear(gsPlay.LoadTexture("GameObjects/gearWarm2"), GridToCenterPosition(242, 80), .5f, -.03f, 1);
            gsPlay.AddBGCoolGear(gsPlay.LoadTexture("GameObjects/gearCool2"), GridToCenterPosition(242, 80), .5f, -.03f, 1);

            for (int x = 1; x <= 16; x++)
            {
                for (int y = 1; y <= 4; y++)
                {
                    string fgName = "LevelTiles/Forest/forestCoolFG" + x + "x" + y;
                    if (File.Exists("Content/" + fgName + ".xnb"))
                    {
                        SpriteIMG fg = gsPlay.AddFrontFGTile(gsPlay.LoadTexture(fgName), new Vector2(1024 * (x - 1), 1024 * (y - 1)));
                        fg.origin = Vector2.Zero;
                        fg.SetPlayerMode(PlayerObjectMode.Two);
                    }

                    string bgName = "LevelTiles/Forest/forestCoolBG" + x + "x" + y;
                    if (File.Exists("Content/" + bgName + ".xnb"))
                    {
                        SpriteIMG bg = gsPlay.AddBackFGTile(gsPlay.LoadTexture(bgName), new Vector2(1024 * (x - 1), 1024 * (y - 1)));
                        bg.origin = Vector2.Zero;
                        bg.SetPlayerMode(PlayerObjectMode.Two);
                    }

                }
            }

            for (int x = 1; x <= 16; x++)
            {
                for (int y = 1; y <= 4; y++)
                {
                    string fgName = "LevelTiles/Forest/forestWarmFG" + x + "x" + y;
                    if (File.Exists("Content/" + fgName + ".xnb"))
                    {
                        SpriteIMG fg = gsPlay.AddFrontFGTile(gsPlay.LoadTexture(fgName), new Vector2(1024 * (x - 1), 1024 * (y - 1)));
                        fg.origin = Vector2.Zero;
                        fg.SetPlayerMode(PlayerObjectMode.One);

                    }

                    string bgName = "LevelTiles/Forest/forestWarmBG" + x + "x" + y;
                    if (File.Exists("Content/" + bgName + ".xnb"))
                    {
                        SpriteIMG bg = gsPlay.AddBackFGTile(gsPlay.LoadTexture(bgName), new Vector2(1024 * (x - 1), 1024 * (y - 1)));
                        bg.origin = Vector2.Zero;
                        bg.SetPlayerMode(PlayerObjectMode.One);
                    }

                }
            }

            rightLimit = levelWidth;

            Sprite cameraTarget = new Sprite(GridToPosition(137, 86));
            gsPlay.cameraPlayer1.AddTarget(cameraTarget);
            gsPlay.cameraPlayer2.AddTarget(cameraTarget);

            cameraTarget = new Sprite(GridToPosition(201, 83));
            gsPlay.cameraPlayer1.AddTarget(cameraTarget);
            gsPlay.cameraPlayer2.AddTarget(cameraTarget);

            atmosphereLight = new Color(150, 150, 150);

            //puzzle 1
            Door d1 = gsPlay.AddFrontFadingDoor(gsPlay.LoadTexture("TestSprites/forestDoorMidWarm"), GridToPosition(new Point(101, 87)), OpenState.Closed, new Vector2(3, -20), new Vector2(128));
            d1.SetPlayerMode(PlayerObjectMode.One);
            Button bb1 = gsPlay.AddButton(new EventTrigger(this, d1), 1, gsPlay.LoadTexture("TestSprites/button"), GridToPosition(new Point(105, 81)));
            gsPlay.AddBouncyBall(.5f, gsPlay.LoadTexture("TestSprites/pickUp"), GridToPosition(new Point(137, 46))).selfIlluminating = true;
            LightningChain lc1 = gsPlay.AddLightning(GridToPosition(new Point(105, 81)), GridToPosition(101, 81), Color.Green);
            lc1.AddVertex(d1.position + new Vector2(0,-64));
            bb1.AddEvent(new EventTrigger(this, lc1));
            lc1.defaultActive = true;
            lc1.SetActive(true);

            //puzzle 2

            //puzzle 3
            MovingPlatform p11 = gsPlay.AddReversePlatform(Art.platform, Level.GridToPosition(new Point(201, 84)), Level.GridToPosition(new Point(201, 84)));
            p11.SetPlayerMode(PlayerObjectMode.One);
            MovingPlatform p12 = gsPlay.AddReversePlatform(Art.platform, Level.GridToPosition(new Point(201, 90)), Level.GridToPosition(new Point(201, 84)));
            FlipSwitch ss1 = gsPlay.AddSwitch(new EventTrigger(this, p12), gsPlay.LoadTexture("TestSprites/switch"), GridToPosition(new Point(212, 81)));
            LightningChain lc2 = gsPlay.AddLightning(ss1.position, GridToPosition(212, 90), Color.Green);
            lc2.AddVertex(GridToPosition(201, 90));
            lc2.AddVertex(p12.position);
            lc2.ConvertEndPointToTarget(p12);
            ss1.AddEvent(new EventTrigger(this, lc2));

            //Moveable m1 = gsPlay.AddMoveable(gsPlay.LoadTexture("TestSprites/moveable"), Level.GridToPosition(new Point(211, 81)), .8f);
            //Moveable m2 = gsPlay.AddMoveable(gsPlay.LoadTexture("TestSprites/moveable"), Level.GridToPosition(new Point(201, 84)), .8f);
            //m2.SetPlayerMode(PlayerObjectMode.One);

            //puzzle 4
            Door d2 = gsPlay.AddFrontFadingDoor(gsPlay.LoadTexture("TestSprites/forestDoorLargeWarm"), GridToPosition(new Point(241, 84)), OpenState.Closed, new Vector2(1,-39), new Vector2(192, 128));
            gsPlay.frontFGList.Add(d2.AddCoolTile(gsPlay.LoadTexture("TestSprites/forestDoorLargeCool")));
            Button bb2 = gsPlay.AddButton(new EventTrigger(this, d2), 2, gsPlay.LoadTexture("TestSprites/button"), GridToPosition(new Point(236, 77)));
            gsPlay.AddBouncyBall(.5f, gsPlay.LoadTexture("TestSprites/pickUp"), GridToPosition(new Point(226, 49))).selfIlluminating = true;
            gsPlay.AddBouncyBall(.5f, gsPlay.LoadTexture("TestSprites/pickUp"), GridToPosition(new Point(238, 55))).selfIlluminating = true;
            LightningChain lc3 = gsPlay.AddLightning(bb2.position, GridToCenterPosition(238, 77) + new Vector2(0, -16), Color.Green);
            lc3.AddVertex(GridToCenterPosition(238, 81));
            lc3.AddVertex(GridToCenterPosition(241, 81) + new Vector2(-16, 0));
            lc3.AddVertex(GridToCenterPosition(241, 81) + new Vector2(-16, 16));
            bb2.AddEvent(new EventTrigger(this, lc3));
            lc3.defaultActive = true;
            lc3.SetActive(true);

            //puzzle 5
            Moveable m3 = gsPlay.AddMoveable(gsPlay.LoadTexture("TestSprites/moveable"), Level.GridToPosition(new Point(261, 85)), .8f);
            m3.SetPlayerMode(PlayerObjectMode.Two);
            Moveable m4 = gsPlay.AddMoveable(gsPlay.LoadTexture("TestSprites/moveable"), Level.GridToPosition(new Point(282, 76)), .8f);

            doubleButtonDoor = gsPlay.AddFrontFadingDoor(gsPlay.LoadTexture("TestSprites/forestDoorMidWarm"), GridToPosition(new Point(315, 78)), OpenState.Closed, new Vector2(3, -20), new Vector2(128));
            gsPlay.frontFGList.Add(doubleButtonDoor.AddCoolTile(gsPlay.LoadTexture("TestSprites/forestDoorMidCool")));

            Button bb3 = gsPlay.AddButton(new EventTrigger(this, 77), 1, gsPlay.LoadTexture("TestSprites/button"), GridToPosition(new Point(308, 80)));
            Button bb4 = gsPlay.AddButton(new EventTrigger(this, 78), 1, gsPlay.LoadTexture("TestSprites/button"), GridToPosition(new Point(321, 80)));
            bb3.SetPlayerMode(PlayerObjectMode.One);
            bb4.SetPlayerMode(PlayerObjectMode.Two);

            LightningChain lc4 = gsPlay.AddLightning(GridToPosition(new Point(308, 80)), GridToPosition(new Point(315, 82)), Color.Yellow);
            bb3.AddEvent(new EventTrigger(this, lc4));
            lc4.defaultActive = true;
            lc4.SetActive(true);

            LightningChain lc5 = gsPlay.AddLightning(GridToPosition(new Point(321, 80)), GridToPosition(new Point(315, 82)), Color.Blue);
            bb4.AddEvent(new EventTrigger(this, lc5));
            lc5.defaultActive = true;
            lc5.SetActive(true);

            lc6 = gsPlay.AddLightning(GridToPosition(315, 82), GridToPosition(315, 80), Color.Green);
            lc6.SetActive(true);

            //secret puzzle
            MovingPlatform p4 = gsPlay.AddPlatform(Art.platform, Level.GridToPosition(new Point(259, 63)), Level.GridToPosition(new Point(278, 63)));

            //red platforms
            MovingPlatform p5 = gsPlay.AddPlatform(Art.platform, Level.GridToPosition(new Point(272, 50)), Level.GridToPosition(new Point(272, 59)));
            p5.SetPlayerMode(PlayerObjectMode.One);
            MovingPlatform p6 = gsPlay.AddPlatform(Art.platform, Level.GridToPosition(new Point(278, 48)), Level.GridToPosition(new Point(289, 48)));
            p6.SetPlayerMode(PlayerObjectMode.One);
            MovingPlatform p7 = gsPlay.AddPlatform(Art.platform, Level.GridToPosition(new Point(304, 38)), Level.GridToPosition(new Point(297, 45)));
            p7.SetPlayerMode(PlayerObjectMode.One);

            //blue platforms
            MovingPlatform p8 = gsPlay.AddPlatform(Art.platform, Level.GridToPosition(new Point(284, 50)), Level.GridToPosition(new Point(284, 59)));
            p8.SetPlayerMode(PlayerObjectMode.Two);
            MovingPlatform p9 = gsPlay.AddPlatform(Art.platform, Level.GridToPosition(new Point(278, 48)), Level.GridToPosition(new Point(267, 48)));
            p9.SetPlayerMode(PlayerObjectMode.Two);
            MovingPlatform p10 = gsPlay.AddPlatform(Art.platform, Level.GridToPosition(new Point(252, 38)), Level.GridToPosition(new Point(259, 45)));
            p10.SetPlayerMode(PlayerObjectMode.Two);

            gsPlay.AddBouncyBall(.5f, gsPlay.LoadTexture("TestSprites/pickUp"), GridToPosition(new Point(245, 32))).selfIlluminating = true;
            gsPlay.AddBouncyBall(.5f, gsPlay.LoadTexture("TestSprites/pickUp"), GridToPosition(new Point(312, 32))).selfIlluminating = true;

            Door d5 = gsPlay.AddFrontFadingDoor(gsPlay.LoadTexture("TestSprites/forestDoorRight"), GridToPosition(new Point(243, 79)) + new Vector2(16,0), OpenState.Closed, new Vector2(-2,10), new Vector2(32, 128));
            gsPlay.frontFGList.Add(d5.AddCoolTile(gsPlay.LoadTexture("TestSprites/forestDoorRightCool")));
            Button bb6 = gsPlay.AddButton(new EventTrigger(this, d5), 2, gsPlay.LoadTexture("TestSprites/button"), GridToPosition(new Point(278, 39)));
            LightningChain lc7 = gsPlay.AddLightning(bb6.position, bb6.position + new Vector2(0, 16), Color.Red);
            lc7.AddVertex(GridToCenterPosition(243, 39));
            lc7.AddVertex(GridToCenterPosition(243, 76) + new Vector2(0, 16));
            bb6.AddEvent(new EventTrigger(this, lc7));
            lc7.defaultActive = true;
            lc7.SetActive(true);

            //6
            //Door d6 = gsPlay.AddFadingDoor(Art.door, GridToPosition(new Point(342, 52)) + new Vector2(-16, 0), OpenState.Closed);
            //gsPlay.AddButton(new EventTrigger(this, d6), 1, gsPlay.LoadTexture("TestSprites/button"), GridToPosition(new Point(97, 10)));
            //Door d7 = gsPlay.AddFadingDoor(Art.door, GridToPosition(new Point(337, 34)) + new Vector2(-16, 0), OpenState.Closed);
               // d7.SetPlayerMode(PlayerObjectMode.One);
            //Button b2 = gsPlay.AddButton(new EventTrigger(this, d7), 1, gsPlay.LoadTexture("TestSprites/button"), GridToPosition(new Point(339, 55)));
            //b2.SetPlayerMode(PlayerObjectMode.Two);

            //blockers
            //Door d9 = gsPlay.AddFadingDoor(Art.door, GridToPosition(new Point(337, 52)) + new Vector2(-16, 0), OpenState.Closed);
            //d9.SetPlayerMode(PlayerObjectMode.Two);
            //Door d8 = gsPlay.AddFadingDoor(Art.door, GridToPosition(new Point(342, 52)) + new Vector2(-16, 0), OpenState.Closed);
            //d8.SetPlayerMode(PlayerObjectMode.One);
            //or gate

            //MovingPlatform p13 = gsPlay.AddReversePlatform(Art.platform, Level.GridToPosition(new Point(96, 10)), Level.GridToPosition(new Point(96, 12)));
            //Button b1 = gsPlay.AddButton(new EventTrigger(this, p13), 1, gsPlay.LoadTexture("TestSprites/button"), GridToPosition(new Point(339, 55)));
            //b1.SetPlayerMode(PlayerObjectMode.One);
            //MovingPlatform p14 = gsPlay.AddReversePlatform(Art.platform, Level.GridToPosition(new Point(99, 10)), Level.GridToPosition(new Point(99, 12)));
            //gsPlay.AddButton(new EventTrigger(this, p14), 1, gsPlay.LoadTexture("TestSprites/button"), GridToPosition(new Point(339, 44)));
            gsPlay.AddBouncyBall(.5f, gsPlay.LoadTexture("TestSprites/pickUp"), GridToPosition(new Point(97, 9))).selfIlluminating = true;
            gsPlay.AddBouncyBall(.5f, gsPlay.LoadTexture("TestSprites/pickUp"), GridToPosition(new Point(98, 9))).selfIlluminating = true;

            //part2
            Door d10 = gsPlay.AddFrontFadingDoor(gsPlay.LoadTexture("TestSprites/forestDoorLeft"), GridToPosition(new Point(362, 74)) + new Vector2(-16, 0), OpenState.Closed, new Vector2(4,10), new Vector2(32, 128));
            d10.SetPlayerMode(PlayerObjectMode.One);
            Door d11 = gsPlay.AddFrontFadingDoor(gsPlay.LoadTexture("TestSprites/forestDoorLeftCool"), GridToPosition(new Point(362, 27)) + new Vector2(-16, 0), OpenState.Closed, new Vector2(4, 10), new Vector2(32, 128));
            d11.SetPlayerMode(PlayerObjectMode.Two);

            //64 40

            Door d14 = gsPlay.AddFrontFadingDoor(gsPlay.LoadTexture("TestSprites/forestDoorRightCool"), GridToPosition(new Point(367, 27)) + new Vector2(-16, 0), OpenState.Closed, new Vector2(-2, 10), new Vector2(32, 128));
            d14.SetPlayerMode(PlayerObjectMode.Two);
            //NEEDS TO BE TIMED!!!
            FlipSwitch s1 = gsPlay.AddOnSwitch(new EventTrigger(this, d14), gsPlay.LoadTexture("TestSprites/switch"), GridToPosition(new Point(364, 40)));
            s1.SetPlayerMode(PlayerObjectMode.One);
            LightningChain lc8 = gsPlay.AddLightning(s1.position, GridToPosition(367, 40) + new Vector2(-16, 0), Color.Yellow);
            lc8.AddVertex(d14.position + new Vector2(0, 64));
            s1.AddEvent(new EventTrigger(this, lc8));
            lc8.defaultActive = true;
            lc8.SetActive(true);

            Door d15 = gsPlay.AddFrontFadingDoor(gsPlay.LoadTexture("TestSprites/forestDoorRight"), GridToPosition(new Point(367, 74)) + new Vector2(-16, 0), OpenState.Closed, new Vector2(-2, 10), new Vector2(32, 128));
            d15.SetPlayerMode(PlayerObjectMode.One);
            //NEEDS TO BE TIMED!!!
            FlipSwitch s2 = gsPlay.AddOnSwitch(new EventTrigger(this, d15), gsPlay.LoadTexture("TestSprites/switch"), GridToPosition(new Point(364, 65)));
            s2.SetPlayerMode(PlayerObjectMode.Two);
            LightningChain lc9 = gsPlay.AddLightning(s2.position, GridToPosition(367, 65) + new Vector2(-16, 0), Color.Blue);
            lc9.AddVertex(d15.position + new Vector2(0, -64));
            s2.AddEvent(new EventTrigger(this, lc9));
            lc9.defaultActive = true;
            lc9.SetActive(true);

            //Add Front FG Tile to Cover bottom of Player One doors
            gsPlay.AddFrontFGTile(gsPlay.LoadTexture("TestSprites/treeTrunkBottomWarm"), GridToPosition(364, 76) + new Vector2(0, 16)).SetPlayerMode(PlayerObjectMode.One);

            PickUpObj o1 = gsPlay.AddBouncyBall(.5f, gsPlay.LoadTexture("TestSprites/pickUp"), GridToPosition(new Point(364, 28)));
            o1.SetPlayerMode(PlayerObjectMode.Two);
            PickUpObj o2 = gsPlay.AddBouncyBall(.5f, gsPlay.LoadTexture("TestSprites/pickUp"), GridToPosition(new Point(364, 75)));
            o2.SetPlayerMode(PlayerObjectMode.One);

            MovingPlatform d12 = gsPlay.AddReversePlatform(Art.door, Level.GridToPosition(new Point(389, 42)) + new Vector2(-16, 0), Level.GridToPosition(new Point(389, 40)) + new Vector2(-16, 0));
            MovingPlatform d23 = gsPlay.AddReversePlatform(Art.door, Level.GridToPosition(new Point(390, 46)) + new Vector2(-16, 0), Level.GridToPosition(new Point(390, 48)) + new Vector2(-16, 0));
            //d12.SetPlayerMode(PlayerObjectMode.Two);
            Button b3 = gsPlay.AddButton(new EventTrigger(this, d12), .5f, gsPlay.LoadTexture("TestSprites/button"), GridToPosition(new Point(391, 36)));
            b3.AddEvent(new EventTrigger(this, d23));
            b3.SetPlayerMode(PlayerObjectMode.One);
            LightningChain lc10 = gsPlay.AddLightning(b3.position, GridToPosition(389, 36), Color.Yellow);
            lc10.AddVertex(d12.position + new Vector2(16, 0));
            b3.AddEvent(new EventTrigger(this, lc10));

            MovingPlatform d13 = gsPlay.AddReversePlatform(Art.door, Level.GridToPosition(new Point(389, 46)) + new Vector2(-16, 0), Level.GridToPosition(new Point(389, 48)) + new Vector2(-16, 0));
            MovingPlatform d22 = gsPlay.AddReversePlatform(Art.door, Level.GridToPosition(new Point(390, 42)) + new Vector2(-16, 0), Level.GridToPosition(new Point(390, 40)) + new Vector2(-16, 0));
            //d13.SetPlayerMode(PlayerObjectMode.One);
            Button b4 = gsPlay.AddButton(new EventTrigger(this, d13), .5f, gsPlay.LoadTexture("TestSprites/button"), GridToPosition(new Point(391, 60)));
            b4.AddEvent(new EventTrigger(this, d22));
            b4.SetPlayerMode(PlayerObjectMode.Two);
            LightningChain lc11 = gsPlay.AddLightning(b4.position, GridToPosition(389, 60), Color.Blue);
            lc11.AddVertex(d13.position + new Vector2(16, 0));
            b4.AddEvent(new EventTrigger(this, lc11));

            //MovingPlatform d22 = gsPlay.AddReversePlatform(Art.door, Level.GridToPosition(new Point(390, 42)) + new Vector2(-16, 0), Level.GridToPosition(new Point(390, 40)) + new Vector2(-16, 0));
            ////d12.SetPlayerMode(PlayerObjectMode.Two);
            //Button b5 = gsPlay.AddButton(new EventTrigger(this, d22), .5f, gsPlay.LoadTexture("TestSprites/button"), GridToPosition(new Point(391, 60)));
            //b5.SetPlayerMode(PlayerObjectMode.Two);
            //MovingPlatform d23 = gsPlay.AddReversePlatform(Art.door, Level.GridToPosition(new Point(390, 46)) + new Vector2(-16, 0), Level.GridToPosition(new Point(390, 48)) + new Vector2(-16, 0));
            ////d13.SetPlayerMode(PlayerObjectMode.One);
            //Button b6 = gsPlay.AddButton(new EventTrigger(this, d23), .5f, gsPlay.LoadTexture("TestSprites/button"), GridToPosition(new Point(391, 36)));
            //b6.SetPlayerMode(PlayerObjectMode.One);

            //MovingPlatform p15 = gsPlay.AddReversePlatform(Art.door, Level.GridToPosition(new Point(367, 49)) + new Vector2(-16, 0), Level.GridToPosition(new Point(367, 47)) + new Vector2(-16, 0));
            //FlipSwitch b5 = gsPlay.AddSwitch(new EventTrigger(this, p15), gsPlay.LoadTexture("TestSprites/switch"), GridToPosition(new Point(365, 45)));
            //b5.pressureCooker = true;
            //MovingPlatform p16 = gsPlay.AddReversePlatform(Art.door, Level.GridToPosition(new Point(367, 53)) + new Vector2(-16, 0), Level.GridToPosition(new Point(367, 55)) + new Vector2(-16, 0));
            //FlipSwitch b6 = gsPlay.AddSwitch(new EventTrigger(this, p16), gsPlay.LoadTexture("TestSprites/switch"), GridToPosition(new Point(365, 60)));
            //b6.pressureCooker = true;

            //gsPlay.AddBouncyBall(.5f, gsPlay.LoadTexture("TestSprites/pickUp"), GridToPosition(new Point(294, 70))).selfIlluminating = true;

            ////and gate
            //MovingPlatform p17 = gsPlay.AddReversePlatform(Art.platform, Level.GridToPosition(new Point(370, 34)), Level.GridToPosition(new Point(370, 36)));
            //FlipSwitch b8 = gsPlay.AddSwitch(new EventTrigger(this, p17), gsPlay.LoadTexture("TestSprites/switch"), GridToPosition(new Point(365, 45)));
            //b8.pressureCooker = true;
            ////b8.SetPlayerMode(PlayerObjectMode.One);
            //MovingPlatform p18 = gsPlay.AddReversePlatform(Art.platform, Level.GridToPosition(new Point(370, 34)), Level.GridToPosition(new Point(370, 36)));
            //FlipSwitch b9 = gsPlay.AddSwitch(new EventTrigger(this, p18), gsPlay.LoadTexture("TestSprites/switch"), GridToPosition(new Point(365, 60)));
            //b9.pressureCooker = true;
            ////b9.SetPlayerMode(PlayerObjectMode.Two);

            //gsPlay.AddBouncyBall(.5f, gsPlay.LoadTexture("TestSprites/pickUp"), GridToPosition(new Point(370, 33))).selfIlluminating = true;

            //Door d17 = gsPlay.AddFadingDoor(Art.platform, GridToPosition(new Point(375, 34)), OpenState.Closed);
            //gsPlay.AddButton(new EventTrigger(this, d17), 1, gsPlay.LoadTexture("TestSprites/button"), GridToPosition(new Point(370, 35)));
            //gsPlay.AddBouncyBall(.5f, gsPlay.LoadTexture("TestSprites/pickUp"), GridToPosition(new Point(375, 33))).selfIlluminating = true;

            //end door

            //Door d16 = gsPlay.AddFadingDoor(gsPlay.LoadTexture("TestSprites/doorThick"), GridToPosition(new Point(390, 44)), OpenState.Closed);
            //Button b7 = gsPlay.AddButton(new EventTrigger(this, d16), 2, gsPlay.LoadTexture("TestSprites/button"), GridToPosition(new Point(364, 53)));

            //364, 53
            //Button (365, 45)
            //Button (365, 60)

            //672,11

            AudioManager.PlayMusic("Forest");
        }