public EnemyCompositeCharacter(World world, Vector2 position, float width, float height, float mass, Texture2D texture) : base(world, position, width, height, mass, texture) { if (width > height) { throw new Exception("Error width > height: can't make character because wheel would stick out of body"); } this.animation = new Animation(); this.audioEmitter = new AudioEmitter(); activity = EnemyActivity.enemyIdle; wheel.OnCollision += new OnCollisionEventHandler(OnCollision); }
public EnemyCompositeCharacter2(World world, Vector2 position, float width, float height, float mass, Texture2D texture) : base(world, position, width, height, mass, texture) { if (width > height) { throw new Exception("Error width > height: can't make character because wheel would stick out of body"); } this.animation = new Animation(); this.audioEmitter = new AudioEmitter(); this.drawOffset = new Vector2(0f, 0f); this.shootStartFrame = 0; this.bulletQueue = new Queue<Bullet>(); this.tempBulletArray = bulletQueue.ToArray(); this.bulletAdded = false; activity = EnemyActivity2.enemyIdle; wheel.OnCollision += new OnCollisionEventHandler(OnCollision); }
/// <summary> /// Load graphics content for the game. /// </summary> public override void LoadContent() { if (content == null) content = new ContentManager(ScreenManager.Game.Services, "Content"); gameFont = content.Load<SpriteFont>("gamefont"); // Initialize camera controls _view = Matrix.Identity; _cameraPosition = new Vector2(0f, 0f); _screenCenter = new Vector2(GameStateManagementGame.graphics.GraphicsDevice.Viewport.Width / 2f, GameStateManagementGame.graphics.GraphicsDevice.Viewport.Height / 2f); _batch = new SpriteBatch(GameStateManagementGame.graphics.GraphicsDevice); _font = content.Load<SpriteFont>("font"); bigFont = content.Load<SpriteFont>("bigFont"); // Load sprites player = content.Load<Texture2D>("player1"); // 95px x 80px => 1m x 1.25m armgun = content.Load<Texture2D>("armgun"); // 28px x 67px => 1m x 1.25m head = content.Load<Texture2D>("head"); // 41px x 37px bulletTex = content.Load<Texture2D>("bullet"); bulletTex2 = content.Load<Texture2D>("bullet2"); squareTex = content.Load<Texture2D>("square"); playerJump = content.Load<Texture2D>("jumping"); playerDead = content.Load<Texture2D>("dead"); playerKnife = content.Load<Texture2D>("knife"); //editing textures crosshair = content.Load<Texture2D>("crosshair"); marker = content.Load<Texture2D>("marker"); //background bg = content.Load<Texture2D>("level1bg"); mg = content.Load<Texture2D>("level1mg"); bgPosB = bgPos + new Vector2(bg.Width, 0f); mgPos = Vector2.Zero; mgPosB = Vector2.Zero; //to be changed //level tiles A_0_0 = content.Load<Texture2D>("level tiles/A_0_0"); A_0_720 = content.Load<Texture2D>("level tiles/A_0_720"); A_1280_0 = content.Load<Texture2D>("level tiles/A_1280_0"); A_1280_720 = content.Load<Texture2D>("level tiles/A_1280_720"); A_2560_1440 = content.Load<Texture2D>("level tiles/A_2560_1440"); A_2560_720 = content.Load<Texture2D>("level tiles/A_2560_720"); A_3840_1440 = content.Load<Texture2D>("level tiles/A_3840_1440"); A_3840_720 = content.Load<Texture2D>("level tiles/A_3840_720"); A_5120_1440 = content.Load<Texture2D>("level tiles/A_5120_1440"); A_5120_720 = content.Load<Texture2D>("level tiles/A_5120_720"); A_M1280_0 = content.Load<Texture2D>("level tiles/A_M1280_0"); A_M1280_720 = content.Load<Texture2D>("level tiles/A_M1280_720"); A_5120_2160 = content.Load<Texture2D>("level tiles/A_5120_2160"); A_6400_1440 = content.Load<Texture2D>("level tiles/A_6400_1440"); A_6400_2160 = content.Load<Texture2D>("level tiles/A_6400_2160"); A_7680_1440 = content.Load<Texture2D>("level tiles/A_7680_1440"); A_7680_2160 = content.Load<Texture2D>("level tiles/A_7680_2160"); //flashing bullet colors playerBulletColors = new List<Color> { Color.Red, Color.WhiteSmoke }; enemyBulletColors = new List<Color> { Color.Red, Color.Black }; //armgun stuff init armgunXOffset = 0; armgunOrigin = Vector2.Zero; //markers markers = new List<Vector2>(); //setup main guy playerTexture = content.Load<Texture2D>("run"); playerAnimation = new Animation(); playerAnimation.Initialize(playerTexture, Vector2.Zero, 86, 119, 25, 30, Color.White, 1f, true, new Vector2(0, 0)); box = new CompositeCharacter(_world, new Vector2(300f, 600f), 64, 128, 0.3f, squareTex); box.forcePower = 100; //create enemies enemies = new List<EnemyCompositeCharacter>(); //knifebear 1 - at start bearBox = new EnemyCompositeCharacter(_world, new Vector2(600f, 600f), 93, 183, 0.15f, squareTex); bearBox.forcePower = 100; enemies.Add(bearBox); //knifebear 1 - at start bearBox = new EnemyCompositeCharacter(_world, new Vector2(800f, 600f), 93, 183, 0.15f, squareTex); bearBox.forcePower = 100; enemies.Add(bearBox); //knifebear 2 - on top of first hill bearBox = new EnemyCompositeCharacter(_world, new Vector2(1430f, 600f), 93, 183, 0.15f, squareTex); bearBox.forcePower = 100; enemies.Add(bearBox); //knifebear 2 - on top of first hill bearBox = new EnemyCompositeCharacter(_world, new Vector2(1630f, 600f), 93, 183, 0.15f, squareTex); bearBox.forcePower = 100; enemies.Add(bearBox); //knifebear 3 - just after second rock bearBox = new EnemyCompositeCharacter(_world, new Vector2(3470f, 980f), 93, 183, 0.15f, squareTex); bearBox.forcePower = 100; enemies.Add(bearBox); //knifebear 3 - just after second rock bearBox = new EnemyCompositeCharacter(_world, new Vector2(5560f, 1800f), 93, 183, 0.15f, squareTex); bearBox.forcePower = 100; enemies.Add(bearBox); //knifebear 4 - before first sea platform bearBox = new EnemyCompositeCharacter(_world, new Vector2(6000f, 1580f), 93, 183, 0.15f, squareTex); bearBox.forcePower = 100; enemies.Add(bearBox); enemies2 = new List<EnemyCompositeCharacter2>(); //shootbear 1 - just after the first stump bear2Box = new EnemyCompositeCharacter2(_world, new Vector2(3925f, 1010f), 93, 183, 0.15f, squareTex); bearBox.forcePower = 100; enemies2.Add(bear2Box); //shootbear 1 - just after the first stump bear2Box = new EnemyCompositeCharacter2(_world, new Vector2(800f, 500f), 93, 183, 0.15f, squareTex); bearBox.forcePower = 100; enemies2.Add(bear2Box); //shootbear 2 - in front of the large tree bear2Box = new EnemyCompositeCharacter2(_world, new Vector2(5460f, 1800f), 93, 183, 0.15f, squareTex); bearBox.forcePower = 100; enemies2.Add(bear2Box); //shootbear 1 - just after the first stump bear2Box = new EnemyCompositeCharacter2(_world, new Vector2(3670f, 980f), 93, 183, 0.15f, squareTex); bearBox.forcePower = 100; enemies2.Add(bear2Box); //shootbear 3 - 3rd sea platform bear2Box = new EnemyCompositeCharacter2(_world, new Vector2(6920f, 1580f), 93, 183, 0.15f, squareTex); bearBox.forcePower = 100; enemies2.Add(bear2Box); //shootbear 3 - 2d sea platform bear2Box = new EnemyCompositeCharacter2(_world, new Vector2(7520f, 1580f), 93, 183, 0.15f, squareTex); bearBox.forcePower = 100; enemies2.Add(bear2Box); //shootbear 3 - 3rd sea platform bear2Box = new EnemyCompositeCharacter2(_world, new Vector2(8170f, 1880f), 93, 183, 0.15f, squareTex); bearBox.forcePower = 100; enemies2.Add(bear2Box); //player ignore collisions with enemies box.body.CollisionGroup = -1; box.wheel.CollisionGroup = -1; for (int i = 0; i < enemies.Count; i++) { enemies[i].body.CollisionGroup = -1; enemies[i].wheel.CollisionGroup = -1; } for (int i = 0; i < enemies2.Count; i++) { enemies2[i].body.CollisionGroup = -1; enemies2[i].wheel.CollisionGroup = -1; } //setup 3d sound audioListener = new AudioListener(); //init bullet stuff //bulletDirection = new Vector2(0, 0); bulletQueue = new Queue<Bullet>(); tempBulletArray = bulletQueue.ToArray(); //setup deadzones deadZones = new List<Rectangle>(); deadZones.Add(new Rectangle(2552, 1040, 402, 115)); //first pit deadZones.Add(new Rectangle(6497, 1989, 402, 115)); //2nd deadZones.Add(new Rectangle(7013, 1992, 502, 115)); //3rd pit deadZones.Add(new Rectangle(7654, 2196, 702, 115)); //last pit // Create the ground fixture Body impassableEdge = BodyFactory.CreateEdge(_world, new Vector2(0f, 3f), new Vector2(0.25f, 3f)); impassableEdge.IsStatic = true; impassableEdge.Restitution = 0.1f; impassableEdge.Friction = 0.7f; //From top of first cliff--------------------------------------------------------------------------------------- FixtureFactory.AttachEdge(new Vector2(-2.06f, 1.215f), new Vector2(-0.32f, 1.185f), impassableEdge); FixtureFactory.AttachEdge(new Vector2(-0.32f, 1.185f), new Vector2(1.29f, 1.285f), impassableEdge); FixtureFactory.AttachEdge(new Vector2(1.29f, 1.285f), new Vector2(2.37f, 1.315f), impassableEdge); FixtureFactory.AttachEdge(new Vector2(2.37f, 1.315f), new Vector2(2.2f, 1.585f), impassableEdge); FixtureFactory.AttachEdge(new Vector2(2.2f, 1.585f), new Vector2(2.08f, 1.645f), impassableEdge); FixtureFactory.AttachEdge(new Vector2(2.08f, 1.645f), new Vector2(2.03f, 1.885f), impassableEdge); FixtureFactory.AttachEdge(new Vector2(2.03f, 1.885f), new Vector2(1.69f, 2.005f), impassableEdge); FixtureFactory.AttachEdge(new Vector2(1.69f, 2.005f), new Vector2(1.47f, 2.225f), impassableEdge); FixtureFactory.AttachEdge(new Vector2(1.47f, 2.225f), new Vector2(1.44f, 2.425f), impassableEdge); FixtureFactory.AttachEdge(new Vector2(1.44f, 2.425f), new Vector2(1.34f, 2.735f), impassableEdge); FixtureFactory.AttachEdge(new Vector2(1.34f, 2.735f), new Vector2(1.41f, 2.965f), impassableEdge); FixtureFactory.AttachEdge(new Vector2(1.41f, 2.965f), new Vector2(1.38f, 3.225f), impassableEdge); FixtureFactory.AttachEdge(new Vector2(1.38f, 3.225f), new Vector2(1.35f, 3.585f), impassableEdge); FixtureFactory.AttachEdge(new Vector2(1.35f, 3.585f), new Vector2(1.36f, 3.885f), impassableEdge); FixtureFactory.AttachEdge(new Vector2(1.36f, 3.885f), new Vector2(1.42f, 4.155f), impassableEdge); FixtureFactory.AttachEdge(new Vector2(1.42f, 4.155f), new Vector2(1.56f, 4.405f), impassableEdge); FixtureFactory.AttachEdge(new Vector2(1.56f, 4.405f), new Vector2(1.68f, 4.585f), impassableEdge); FixtureFactory.AttachEdge(new Vector2(1.68f, 4.585f), new Vector2(1.56f, 4.825f), impassableEdge); FixtureFactory.AttachEdge(new Vector2(1.56f, 4.825f), new Vector2(1.71f, 5.275f), impassableEdge); FixtureFactory.AttachEdge(new Vector2(1.71f, 5.275f), new Vector2(1.81f, 5.405f), impassableEdge); FixtureFactory.AttachEdge(new Vector2(1.81f, 5.405f), new Vector2(1.86f, 5.575f), impassableEdge); FixtureFactory.AttachEdge(new Vector2(1.86f, 5.575f), new Vector2(1.98f, 5.755f), impassableEdge); FixtureFactory.AttachEdge(new Vector2(1.98f, 5.755f), new Vector2(2.16f, 6.015f), impassableEdge); FixtureFactory.AttachEdge(new Vector2(2.16f, 6.015f), new Vector2(2.26f, 6.085f), impassableEdge); FixtureFactory.AttachEdge(new Vector2(2.26f, 6.085f), new Vector2(2.28f, 6.185f), impassableEdge); FixtureFactory.AttachEdge(new Vector2(2.28f, 6.185f), new Vector2(2.35f, 6.325f), impassableEdge); FixtureFactory.AttachEdge(new Vector2(2.35f, 6.325f), new Vector2(2.43f, 6.465f), impassableEdge); FixtureFactory.AttachEdge(new Vector2(2.43f, 6.465f), new Vector2(16.38f, 6.465f), impassableEdge); FixtureFactory.AttachEdge(new Vector2(16.38f, 6.465f), new Vector2(22.68f, 8.915f), impassableEdge); FixtureFactory.AttachEdge(new Vector2(22.68f, 8.915f), new Vector2(23.85f, 8.125f), impassableEdge); FixtureFactory.AttachEdge(new Vector2(23.85f, 8.125f), new Vector2(26.29f, 8.065f), impassableEdge); FixtureFactory.AttachEdge(new Vector2(26.29f, 8.065f), new Vector2(26.48f, 8.165f), impassableEdge); FixtureFactory.AttachEdge(new Vector2(26.48f, 8.165f), new Vector2(26.43f, 8.825f), impassableEdge); FixtureFactory.AttachEdge(new Vector2(26.43f, 8.825f), new Vector2(26.24f, 9.395f), impassableEdge); FixtureFactory.AttachEdge(new Vector2(26.24f, 9.395f), new Vector2(26.38f, 9.885f), impassableEdge); FixtureFactory.AttachEdge(new Vector2(26.38f, 9.885f), new Vector2(26.15f, 10.215f), impassableEdge); FixtureFactory.AttachEdge(new Vector2(26.15f, 10.215f), new Vector2(25.67f, 10.425f), impassableEdge); FixtureFactory.AttachEdge(new Vector2(25.67f, 10.425f), new Vector2(25.95f, 10.945f), impassableEdge); FixtureFactory.AttachEdge(new Vector2(25.95f, 10.945f), new Vector2(26.03f, 11.505f), impassableEdge); FixtureFactory.AttachEdge(new Vector2(26.03f, 11.505f), new Vector2(25.8f, 12.015f), impassableEdge); FixtureFactory.AttachEdge(new Vector2(25.8f, 12.015f), new Vector2(25.65f, 12.775f), impassableEdge); FixtureFactory.AttachEdge(new Vector2(25.65f, 12.775f), new Vector2(25.66f, 13.225f), impassableEdge); FixtureFactory.AttachEdge(new Vector2(25.66f, 13.225f), new Vector2(25.65f, 13.845f), impassableEdge); FixtureFactory.AttachEdge(new Vector2(25.65f, 13.845f), new Vector2(25.62f, 14.405f), impassableEdge); FixtureFactory.AttachEdge(new Vector2(25.62f, 14.405f), new Vector2(25.74f, 14.115f), impassableEdge); FixtureFactory.AttachEdge(new Vector2(25.74f, 14.115f), new Vector2(21.72f, 16.385f), impassableEdge); //To bottom of rock jump on the left--------------------------------------------------------------------------------------- //From bottom of rock jump on right---------------------------------------------------------------------------------- FixtureFactory.AttachEdge(new Vector2(29.19f, 14.08f), new Vector2(29.19f, 13.36f), impassableEdge); FixtureFactory.AttachEdge(new Vector2(29.19f, 13.36f), new Vector2(29.01f, 12.87f), impassableEdge); FixtureFactory.AttachEdge(new Vector2(29.01f, 12.87f), new Vector2(28.92f, 12.63f), impassableEdge); FixtureFactory.AttachEdge(new Vector2(28.92f, 12.63f), new Vector2(29.11f, 11.9f), impassableEdge); FixtureFactory.AttachEdge(new Vector2(29.11f, 11.9f), new Vector2(29.18f, 11.23f), impassableEdge); FixtureFactory.AttachEdge(new Vector2(29.18f, 11.23f), new Vector2(29.39f, 11.11f), impassableEdge); FixtureFactory.AttachEdge(new Vector2(29.39f, 11.11f), new Vector2(29.28f, 10.72f), impassableEdge); FixtureFactory.AttachEdge(new Vector2(29.28f, 10.72f), new Vector2(29.4f, 10.14f), impassableEdge); FixtureFactory.AttachEdge(new Vector2(29.4f, 10.14f), new Vector2(29.55f, 9.99f), impassableEdge); FixtureFactory.AttachEdge(new Vector2(29.55f, 9.99f), new Vector2(30.07f, 9.96f), impassableEdge); FixtureFactory.AttachEdge(new Vector2(30.07f, 9.96f), new Vector2(30.61f, 10.03f), impassableEdge); FixtureFactory.AttachEdge(new Vector2(30.61f, 10.03f), new Vector2(31.33f, 10.06f), impassableEdge); FixtureFactory.AttachEdge(new Vector2(31.33f, 10.06f), new Vector2(31.9f, 10.05f), impassableEdge); FixtureFactory.AttachEdge(new Vector2(31.9f, 10.05f), new Vector2(32.32f, 10.12f), impassableEdge); FixtureFactory.AttachEdge(new Vector2(32.32f, 10.12f), new Vector2(32.67f, 10.29f), impassableEdge); FixtureFactory.AttachEdge(new Vector2(32.67f, 10.29f), new Vector2(32.94f, 10.46f), impassableEdge); FixtureFactory.AttachEdge(new Vector2(32.94f, 10.46f), new Vector2(33.18f, 10.68f), impassableEdge); FixtureFactory.AttachEdge(new Vector2(33.18f, 10.68f), new Vector2(33.63f, 10.69f), impassableEdge); FixtureFactory.AttachEdge(new Vector2(33.63f, 10.69f), new Vector2(34.57f, 10.7f), impassableEdge); FixtureFactory.AttachEdge(new Vector2(34.57f, 10.7f), new Vector2(35.5f, 10.63f), impassableEdge); FixtureFactory.AttachEdge(new Vector2(35.5f, 10.63f), new Vector2(36.26f, 10.67f), impassableEdge); FixtureFactory.AttachEdge(new Vector2(36.26f, 10.67f), new Vector2(36.83f, 10.62f), impassableEdge); FixtureFactory.AttachEdge(new Vector2(36.83f, 10.62f), new Vector2(36.96f, 10.42f), impassableEdge); FixtureFactory.AttachEdge(new Vector2(36.96f, 10.42f), new Vector2(37.04f, 10.33f), impassableEdge); FixtureFactory.AttachEdge(new Vector2(37.04f, 10.33f), new Vector2(37.07f, 10.21f), impassableEdge); FixtureFactory.AttachEdge(new Vector2(37.07f, 10.21f), new Vector2(37.34f, 10.19f), impassableEdge); FixtureFactory.AttachEdge(new Vector2(37.34f, 10.19f), new Vector2(37.77f, 10.23f), impassableEdge); FixtureFactory.AttachEdge(new Vector2(37.77f, 10.23f), new Vector2(38.19f, 10.27f), impassableEdge); FixtureFactory.AttachEdge(new Vector2(38.19f, 10.27f), new Vector2(38.36f, 10.29f), impassableEdge); FixtureFactory.AttachEdge(new Vector2(38.36f, 10.29f), new Vector2(38.41f, 10.59f), impassableEdge); FixtureFactory.AttachEdge(new Vector2(38.41f, 10.59f), new Vector2(38.61f, 10.77f), impassableEdge); FixtureFactory.AttachEdge(new Vector2(38.61f, 10.77f), new Vector2(39f, 10.87f), impassableEdge); FixtureFactory.AttachEdge(new Vector2(39f, 10.87f), new Vector2(42.73f, 11f), impassableEdge); FixtureFactory.AttachEdge(new Vector2(42.73f, 11f), new Vector2(43.95f, 11f), impassableEdge); FixtureFactory.AttachEdge(new Vector2(43.95f, 11f), new Vector2(43.79f, 11.63f), impassableEdge); FixtureFactory.AttachEdge(new Vector2(43.79f, 11.63f), new Vector2(43.72f, 12.17f), impassableEdge); FixtureFactory.AttachEdge(new Vector2(43.72f, 12.17f), new Vector2(43.68f, 12.78f), impassableEdge); FixtureFactory.AttachEdge(new Vector2(43.68f, 12.78f), new Vector2(43.66f, 13.58f), impassableEdge); FixtureFactory.AttachEdge(new Vector2(43.66f, 13.58f), new Vector2(43.7f, 13.87f), impassableEdge); FixtureFactory.AttachEdge(new Vector2(43.7f, 13.87f), new Vector2(43.51f, 14.35f), impassableEdge); //To just above the cave, on the cliff vertical edge //from tip of big tree branch platform FixtureFactory.AttachEdge(new Vector2(45.928f, 13.036f), new Vector2(46.718f, 13.016f), impassableEdge); FixtureFactory.AttachEdge(new Vector2(46.718f, 13.016f), new Vector2(47.618f, 12.976f), impassableEdge); FixtureFactory.AttachEdge(new Vector2(47.618f, 12.976f), new Vector2(48.728f, 12.796f), impassableEdge); FixtureFactory.AttachEdge(new Vector2(48.728f, 12.796f), new Vector2(48.988f, 12.616f), impassableEdge); FixtureFactory.AttachEdge(new Vector2(48.988f, 12.616f), new Vector2(49.368f, 12.676f), impassableEdge); FixtureFactory.AttachEdge(new Vector2(49.368f, 12.676f), new Vector2(49.348f, 12.306f), impassableEdge); FixtureFactory.AttachEdge(new Vector2(49.348f, 12.306f), new Vector2(49.228f, 11.796f), impassableEdge); FixtureFactory.AttachEdge(new Vector2(49.228f, 11.796f), new Vector2(49.238f, 11.116f), impassableEdge); FixtureFactory.AttachEdge(new Vector2(49.238f, 11.116f), new Vector2(49.078f, 10.146f), impassableEdge); FixtureFactory.AttachEdge(new Vector2(49.078f, 10.146f), new Vector2(48.808f, 9.256f), impassableEdge); FixtureFactory.AttachEdge(new Vector2(48.808f, 9.256f), new Vector2(48.388f, 8.296f), impassableEdge); FixtureFactory.AttachEdge(new Vector2(48.388f, 8.296f), new Vector2(47.718f, 7.056f), impassableEdge); //to above big tree //from top of cave FixtureFactory.AttachEdge(new Vector2(42.92f, 14.67f), new Vector2(42.47f, 14.98f), impassableEdge); FixtureFactory.AttachEdge(new Vector2(42.47f, 14.98f), new Vector2(42.34f, 15.52f), impassableEdge); FixtureFactory.AttachEdge(new Vector2(42.34f, 15.52f), new Vector2(42.26f, 16.11f), impassableEdge); FixtureFactory.AttachEdge(new Vector2(42.26f, 16.11f), new Vector2(42.28f, 16.56f), impassableEdge); FixtureFactory.AttachEdge(new Vector2(42.28f, 16.56f), new Vector2(44.93f, 16.56f), impassableEdge); FixtureFactory.AttachEdge(new Vector2(44.93f, 16.56f), new Vector2(45.98f, 16.8f), impassableEdge); FixtureFactory.AttachEdge(new Vector2(45.98f, 16.8f), new Vector2(50.18f, 18.92f), impassableEdge); FixtureFactory.AttachEdge(new Vector2(50.18f, 18.92f), new Vector2(57.04f, 19.23f), impassableEdge); FixtureFactory.AttachEdge(new Vector2(57.04f, 19.23f), new Vector2(57f, 18.9f), impassableEdge); FixtureFactory.AttachEdge(new Vector2(57f, 18.9f), new Vector2(57.13f, 18.35f), impassableEdge); FixtureFactory.AttachEdge(new Vector2(57.13f, 18.35f), new Vector2(57.47f, 18.06f), impassableEdge); FixtureFactory.AttachEdge(new Vector2(57.47f, 18.06f), new Vector2(58.06f, 18f), impassableEdge); FixtureFactory.AttachEdge(new Vector2(58.06f, 18f), new Vector2(58.51f, 18.28f), impassableEdge); FixtureFactory.AttachEdge(new Vector2(58.51f, 18.28f), new Vector2(58.69f, 18.39f), impassableEdge); FixtureFactory.AttachEdge(new Vector2(58.69f, 18.39f), new Vector2(58.84f, 18.61f), impassableEdge); FixtureFactory.AttachEdge(new Vector2(58.84f, 18.61f), new Vector2(58.99f, 18.91f), impassableEdge); FixtureFactory.AttachEdge(new Vector2(58.99f, 18.91f), new Vector2(58.96f, 19.21f), impassableEdge); FixtureFactory.AttachEdge(new Vector2(58.96f, 19.21f), new Vector2(63.11f, 19.00f), impassableEdge); //To the ground just past the big tree //from log to end of the nearest cliff and all ending collisions FixtureFactory.AttachEdge(new Vector2(63.11f, 19.00f), new Vector2(65.26f, 18.87f), impassableEdge); FixtureFactory.AttachEdge(new Vector2(65.26f, 18.87f), new Vector2(65.21f, 19.2f), impassableEdge); FixtureFactory.AttachEdge(new Vector2(65.21f, 19.2f), new Vector2(65.23f, 19.5f), impassableEdge); FixtureFactory.AttachEdge(new Vector2(65.23f, 19.5f), new Vector2(65.11f, 19.83f), impassableEdge); FixtureFactory.AttachEdge(new Vector2(65.11f, 19.83f), new Vector2(65.05f, 20.19f), impassableEdge); FixtureFactory.AttachEdge(new Vector2(65.05f, 20.19f), new Vector2(65.03f, 20.48f), impassableEdge); FixtureFactory.AttachEdge(new Vector2(65.03f, 20.48f), new Vector2(64.9f, 20.69f), impassableEdge); FixtureFactory.AttachEdge(new Vector2(64.9f, 20.69f), new Vector2(64.78f, 21.03f), impassableEdge); FixtureFactory.AttachEdge(new Vector2(64.78f, 21.03f), new Vector2(64.79f, 21.18f), impassableEdge); FixtureFactory.AttachEdge(new Vector2(64.79f, 21.18f), new Vector2(64.71f, 21.4f), impassableEdge); FixtureFactory.AttachEdge(new Vector2(64.71f, 21.4f), new Vector2(64.47f, 22.44f), impassableEdge); FixtureFactory.AttachEdge(new Vector2(64.47f, 22.44f), new Vector2(64.17f, 23.53f), impassableEdge); FixtureFactory.AttachEdge(new Vector2(64.17f, 23.53f), new Vector2(64.09f, 23.98f), impassableEdge); FixtureFactory.AttachEdge(new Vector2(64.09f, 23.98f), new Vector2(64.19f, 24.48f), impassableEdge); FixtureFactory.AttachEdge(new Vector2(64.19f, 24.48f), new Vector2(64.11f, 24.92f), impassableEdge); FixtureFactory.AttachEdge(new Vector2(64.11f, 24.92f), new Vector2(67.52f, 24.04f), impassableEdge); FixtureFactory.AttachEdge(new Vector2(67.52f, 24.04f), new Vector2(67.55f, 23.69f), impassableEdge); FixtureFactory.AttachEdge(new Vector2(67.55f, 23.69f), new Vector2(67.54f, 23.17f), impassableEdge); FixtureFactory.AttachEdge(new Vector2(67.54f, 23.17f), new Vector2(67.63f, 22.94f), impassableEdge); FixtureFactory.AttachEdge(new Vector2(67.63f, 22.94f), new Vector2(67.59f, 22.65f), impassableEdge); FixtureFactory.AttachEdge(new Vector2(67.59f, 22.65f), new Vector2(67.62f, 22.1f), impassableEdge); FixtureFactory.AttachEdge(new Vector2(67.62f, 22.1f), new Vector2(67.57f, 21.86f), impassableEdge); FixtureFactory.AttachEdge(new Vector2(67.57f, 21.86f), new Vector2(67.64f, 21.22f), impassableEdge); FixtureFactory.AttachEdge(new Vector2(67.64f, 21.22f), new Vector2(67.74f, 20.8f), impassableEdge); FixtureFactory.AttachEdge(new Vector2(67.74f, 20.8f), new Vector2(67.69f, 20.47f), impassableEdge); FixtureFactory.AttachEdge(new Vector2(67.69f, 20.47f), new Vector2(67.76f, 19.96f), impassableEdge); FixtureFactory.AttachEdge(new Vector2(67.76f, 19.96f), new Vector2(67.74f, 19.49f), impassableEdge); FixtureFactory.AttachEdge(new Vector2(67.74f, 19.49f), new Vector2(67.72f, 19.35f), impassableEdge); FixtureFactory.AttachEdge(new Vector2(67.72f, 19.35f), new Vector2(67.69f, 19.16f), impassableEdge); FixtureFactory.AttachEdge(new Vector2(67.69f, 19.16f), new Vector2(68.65f, 19.19f), impassableEdge); FixtureFactory.AttachEdge(new Vector2(68.65f, 19.19f), new Vector2(69.49f, 19.17f), impassableEdge); FixtureFactory.AttachEdge(new Vector2(69.49f, 19.17f), new Vector2(70.38f, 19.14f), impassableEdge); FixtureFactory.AttachEdge(new Vector2(70.38f, 19.14f), new Vector2(70.29f, 19.4f), impassableEdge); FixtureFactory.AttachEdge(new Vector2(70.29f, 19.4f), new Vector2(70.22f, 19.93f), impassableEdge); FixtureFactory.AttachEdge(new Vector2(70.22f, 19.93f), new Vector2(70.27f, 20.3f), impassableEdge); FixtureFactory.AttachEdge(new Vector2(70.27f, 20.3f), new Vector2(70.24f, 20.69f), impassableEdge); FixtureFactory.AttachEdge(new Vector2(70.24f, 20.69f), new Vector2(70.13f, 21.25f), impassableEdge); FixtureFactory.AttachEdge(new Vector2(70.13f, 21.25f), new Vector2(70.09f, 21.88f), impassableEdge); FixtureFactory.AttachEdge(new Vector2(70.09f, 21.88f), new Vector2(70.15f, 22.33f), impassableEdge); FixtureFactory.AttachEdge(new Vector2(70.15f, 22.33f), new Vector2(70.09f, 22.64f), impassableEdge); FixtureFactory.AttachEdge(new Vector2(70.09f, 22.64f), new Vector2(70.13f, 23.02f), impassableEdge); FixtureFactory.AttachEdge(new Vector2(70.13f, 23.02f), new Vector2(70.03f, 23.39f), impassableEdge); FixtureFactory.AttachEdge(new Vector2(70.03f, 23.39f), new Vector2(70.06f, 23.95f), impassableEdge); FixtureFactory.AttachEdge(new Vector2(70.06f, 23.95f), new Vector2(70.05f, 24.34f), impassableEdge); FixtureFactory.AttachEdge(new Vector2(70.05f, 24.34f), new Vector2(72.79f, 25.69f), impassableEdge); FixtureFactory.AttachEdge(new Vector2(72.79f, 25.69f), new Vector2(72.87f, 25.48f), impassableEdge); FixtureFactory.AttachEdge(new Vector2(72.87f, 25.48f), new Vector2(72.86f, 25.18f), impassableEdge); FixtureFactory.AttachEdge(new Vector2(72.86f, 25.18f), new Vector2(72.87f, 24.99f), impassableEdge); FixtureFactory.AttachEdge(new Vector2(72.87f, 24.99f), new Vector2(72.86f, 24.46f), impassableEdge); FixtureFactory.AttachEdge(new Vector2(72.86f, 24.46f), new Vector2(72.85f, 24.25f), impassableEdge); FixtureFactory.AttachEdge(new Vector2(72.85f, 24.25f), new Vector2(73.14f, 23.35f), impassableEdge); FixtureFactory.AttachEdge(new Vector2(73.14f, 23.35f), new Vector2(73.04f, 22.64f), impassableEdge); FixtureFactory.AttachEdge(new Vector2(73.04f, 22.64f), new Vector2(72.92f, 22.17f), impassableEdge); FixtureFactory.AttachEdge(new Vector2(72.92f, 22.17f), new Vector2(73.01f, 21.91f), impassableEdge); FixtureFactory.AttachEdge(new Vector2(73.01f, 21.91f), new Vector2(72.95f, 21.7f), impassableEdge); FixtureFactory.AttachEdge(new Vector2(72.95f, 21.7f), new Vector2(73.08f, 21.36f), impassableEdge); FixtureFactory.AttachEdge(new Vector2(73.08f, 21.36f), new Vector2(73.09f, 20.29f), impassableEdge); FixtureFactory.AttachEdge(new Vector2(73.09f, 20.29f), new Vector2(73.07f, 20.08f), impassableEdge); FixtureFactory.AttachEdge(new Vector2(73.07f, 20.08f), new Vector2(73.19f, 19.13f), impassableEdge); FixtureFactory.AttachEdge(new Vector2(73.19f, 19.13f), new Vector2(73.23f, 18.92f), impassableEdge); FixtureFactory.AttachEdge(new Vector2(73.23f, 18.92f), new Vector2(73.16f, 18.67f), impassableEdge); FixtureFactory.AttachEdge(new Vector2(73.16f, 18.67f), new Vector2(73.12f, 18.3f), impassableEdge); FixtureFactory.AttachEdge(new Vector2(73.12f, 18.3f), new Vector2(76.87f, 18.34f), impassableEdge); FixtureFactory.AttachEdge(new Vector2(76.87f, 18.34f), new Vector2(76.76f, 18.79f), impassableEdge); FixtureFactory.AttachEdge(new Vector2(76.76f, 18.79f), new Vector2(76.69f, 18.9f), impassableEdge); FixtureFactory.AttachEdge(new Vector2(76.69f, 18.9f), new Vector2(76.75f, 19.8f), impassableEdge); FixtureFactory.AttachEdge(new Vector2(76.75f, 19.8f), new Vector2(76.82f, 20.19f), impassableEdge); FixtureFactory.AttachEdge(new Vector2(76.82f, 20.19f), new Vector2(76.77f, 20.72f), impassableEdge); FixtureFactory.AttachEdge(new Vector2(76.77f, 20.72f), new Vector2(76.74f, 21.35f), impassableEdge); FixtureFactory.AttachEdge(new Vector2(76.74f, 21.35f), new Vector2(76.62f, 21.86f), impassableEdge); FixtureFactory.AttachEdge(new Vector2(76.62f, 21.86f), new Vector2(76.53f, 22.37f), impassableEdge); FixtureFactory.AttachEdge(new Vector2(76.53f, 22.37f), new Vector2(76.5f, 22.8f), impassableEdge); FixtureFactory.AttachEdge(new Vector2(76.5f, 22.8f), new Vector2(76.56f, 23f), impassableEdge); FixtureFactory.AttachEdge(new Vector2(76.56f, 23f), new Vector2(76.59f, 23.27f), impassableEdge); FixtureFactory.AttachEdge(new Vector2(76.59f, 23.27f), new Vector2(76.63f, 23.41f), impassableEdge); FixtureFactory.AttachEdge(new Vector2(76.63f, 23.41f), new Vector2(76.59f, 23.58f), impassableEdge); FixtureFactory.AttachEdge(new Vector2(76.59f, 23.58f), new Vector2(76.6f, 23.86f), impassableEdge); FixtureFactory.AttachEdge(new Vector2(76.6f, 23.86f), new Vector2(76.62f, 24.36f), impassableEdge); FixtureFactory.AttachEdge(new Vector2(76.62f, 24.36f), new Vector2(76.58f, 24.48f), impassableEdge); FixtureFactory.AttachEdge(new Vector2(76.58f, 24.48f), new Vector2(76.56f, 24.78f), impassableEdge); FixtureFactory.AttachEdge(new Vector2(76.56f, 24.78f), new Vector2(76.53f, 25.29f), impassableEdge); FixtureFactory.AttachEdge(new Vector2(76.53f, 25.29f), new Vector2(76.52f, 25.69f), impassableEdge); FixtureFactory.AttachEdge(new Vector2(76.52f, 25.69f), new Vector2(76.47f, 26.12f), impassableEdge); FixtureFactory.AttachEdge(new Vector2(76.47f, 26.12f), new Vector2(76.47f, 26.45f), impassableEdge); FixtureFactory.AttachEdge(new Vector2(76.47f, 26.45f), new Vector2(76.41f, 26.79f), impassableEdge); FixtureFactory.AttachEdge(new Vector2(76.41f, 26.79f), new Vector2(76.47f, 27.1f), impassableEdge); FixtureFactory.AttachEdge(new Vector2(76.47f, 27.1f), new Vector2(76.46f, 27.38f), impassableEdge); FixtureFactory.AttachEdge(new Vector2(76.46f, 27.38f), new Vector2(80.6f, 26.87f), impassableEdge); FixtureFactory.AttachEdge(new Vector2(80.6f, 26.87f), new Vector2(80.55f, 26.71f), impassableEdge); FixtureFactory.AttachEdge(new Vector2(80.55f, 26.71f), new Vector2(80.59f, 26.55f), impassableEdge); FixtureFactory.AttachEdge(new Vector2(80.59f, 26.55f), new Vector2(80.6f, 26.21f), impassableEdge); FixtureFactory.AttachEdge(new Vector2(80.6f, 26.21f), new Vector2(80.71f, 25.79f), impassableEdge); FixtureFactory.AttachEdge(new Vector2(80.71f, 25.79f), new Vector2(80.67f, 25.39f), impassableEdge); FixtureFactory.AttachEdge(new Vector2(80.67f, 25.39f), new Vector2(80.71f, 24.99f), impassableEdge); FixtureFactory.AttachEdge(new Vector2(80.71f, 24.99f), new Vector2(80.69f, 24.55f), impassableEdge); FixtureFactory.AttachEdge(new Vector2(80.69f, 24.55f), new Vector2(80.76f, 24.1f), impassableEdge); FixtureFactory.AttachEdge(new Vector2(80.76f, 24.1f), new Vector2(80.7f, 23.62f), impassableEdge); FixtureFactory.AttachEdge(new Vector2(80.7f, 23.62f), new Vector2(80.72f, 23.26f), impassableEdge); FixtureFactory.AttachEdge(new Vector2(80.72f, 23.26f), new Vector2(80.76f, 22.79f), impassableEdge); FixtureFactory.AttachEdge(new Vector2(80.76f, 22.79f), new Vector2(80.79f, 22.25f), impassableEdge); FixtureFactory.AttachEdge(new Vector2(80.79f, 22.25f), new Vector2(80.78f, 21.79f), impassableEdge); FixtureFactory.AttachEdge(new Vector2(80.78f, 21.79f), new Vector2(80.72f, 21.47f), impassableEdge); FixtureFactory.AttachEdge(new Vector2(80.72f, 21.47f), new Vector2(80.67f, 21.13f), impassableEdge); FixtureFactory.AttachEdge(new Vector2(80.67f, 21.13f), new Vector2(81.8f, 21.16f), impassableEdge); FixtureFactory.AttachEdge(new Vector2(81.8f, 21.16f), new Vector2(82.78f, 21.22f), impassableEdge); FixtureFactory.AttachEdge(new Vector2(82.78f, 21.22f), new Vector2(83.65f, 21.21f), impassableEdge); FixtureFactory.AttachEdge(new Vector2(83.65f, 21.21f), new Vector2(84.7f, 21.23f), impassableEdge); FixtureFactory.AttachEdge(new Vector2(84.7f, 21.23f), new Vector2(84.57f, 21.98f), impassableEdge); FixtureFactory.AttachEdge(new Vector2(84.57f, 21.98f), new Vector2(84.6f, 22.76f), impassableEdge); FixtureFactory.AttachEdge(new Vector2(84.6f, 22.76f), new Vector2(84.45f, 23.58f), impassableEdge); FixtureFactory.AttachEdge(new Vector2(84.45f, 23.58f), new Vector2(84.42f, 24.41f), impassableEdge); FixtureFactory.AttachEdge(new Vector2(84.42f, 24.41f), new Vector2(84.46f, 25.37f), impassableEdge); //play game music if (GameStateManagementGame.music == 0) { GameStateManagementGame.gameSongsCue = GameStateManagementGame.soundBank.GetCue("gamesongs"); GameStateManagementGame.gameSongsCue.Play(); GameStateManagementGame.music = 2; } firstGameUpdate = true; ScreenManager.Game.ResetElapsedTime(); }