public override void Draw(GameTime gameTime) { ScreenManager.SpriteBatch.Begin(0, null, null, null, null, null, Camera.View); ScreenManager.SpriteBatch.Draw(_rectangleSprite.Texture, ConvertUnits.ToDisplayUnits(_rectangle.Position), null, Color.White, _rectangle.Rotation, _rectangleSprite.Origin, 1f, SpriteEffects.None, 0f); ScreenManager.SpriteBatch.Draw(this.gamePadSprite2.Texture, ConvertUnits.ToDisplayUnits(this.gamePad2.Position), null, Color.White, this.gamePad2.Rotation, this.gamePadSprite2.Origin, 1f, SpriteEffects.None, 0f); ScreenManager.SpriteBatch.Draw(this.gamePadSprite1.Texture, ConvertUnits.ToDisplayUnits(this.gamePad1.Position), null, Color.White, this.gamePad1.Rotation, this.gamePadSprite1.Origin, 1f, SpriteEffects.None, 0f); foreach (var bodySprite in dymanicShit) { ScreenManager.SpriteBatch.Draw(bodySprite.Sprite.Texture, ConvertUnits.ToDisplayUnits(bodySprite.Body.Position), null, Color.White, bodySprite.Body.Rotation, bodySprite.Sprite.Origin, 1f, SpriteEffects.None, 0f); } ScreenManager.SpriteBatch.End(); _border.Draw(); base.Draw(gameTime); }
public override void Draw(GameTime gameTime) { ScreenManager.SpriteBatch.Begin(0, null, null, null, null, null, Camera.View); for (int i = 0; i < _softBodies.Count; ++i) { ScreenManager.SpriteBatch.Draw(_softBodyBox.Texture, ConvertUnits.ToDisplayUnits(_softBodies[i].Position), null, Color.White, _softBodies[i].Rotation, _softBodyBox.Origin, 1f, SpriteEffects.None, 0f); } for (int i = 0; i < _softBodies.Count; ++i) { ScreenManager.SpriteBatch.Draw(_softBodyCircle.Texture, ConvertUnits.ToDisplayUnits(_softBodies[i].Position), null, Color.White, _softBodies[i].Rotation, _softBodyCircle.Origin, 1f, SpriteEffects.None, 0f); } for (int i = 0; i < _bridgeBodies.Count; ++i) { ScreenManager.SpriteBatch.Draw(_bridgeBox.Texture, ConvertUnits.ToDisplayUnits(_bridgeBodies[i].Position), null, Color.White, _bridgeBodies[i].Rotation, _bridgeBox.Origin, 1f, SpriteEffects.None, 0f); } ScreenManager.SpriteBatch.End(); _border.Draw(); base.Draw(gameTime); }
public override void Draw(GameTime gameTime) { ScreenManager.SpriteBatch.Begin(0, null, null, null, null, null, Camera.View); ScreenManager.SpriteBatch.Draw(_rectangleSprite.Texture, ConvertUnits.ToDisplayUnits(_rectangle.Position), null, Color.White, _rectangle.Rotation, _rectangleSprite.Origin, 1f, SpriteEffects.None, 0f); //for (int i = 0; i < 5; ++i) //{ // ScreenManager.SpriteBatch.Draw(_obstacle.Texture, ConvertUnits.ToDisplayUnits(_obstacles[i].Position), // null, // Color.White, _obstacles[i].Rotation, _obstacle.Origin, 1f, // SpriteEffects.None, 0f); //} ScreenManager.SpriteBatch.Draw(this.gamePadSprite2.Texture, ConvertUnits.ToDisplayUnits(this.gamePad2.Position), null, Color.White, this.gamePad2.Rotation, this.gamePadSprite2.Origin, 1f, SpriteEffects.None, 0f); ScreenManager.SpriteBatch.Draw(this.gamePadSprite1.Texture, ConvertUnits.ToDisplayUnits(this.gamePad1.Position), null, Color.White, this.gamePad1.Rotation, this.gamePadSprite1.Origin, 1f, SpriteEffects.None, 0f); ScreenManager.SpriteBatch.End(); _border.Draw(); base.Draw(gameTime); }
public override void Draw(GameTime gameTime) { ScreenManager.SpriteBatch.Begin(0, null, null, null, null, null, Camera.View); _spiderweb.Draw(ScreenManager.SpriteBatch); ScreenManager.SpriteBatch.End(); _border.Draw(); base.Draw(gameTime); }
public override void Draw(GameTime gameTime) { ScreenManager.SpriteBatch.Begin(0, null, null, null, null, null, Camera.View); ScreenManager.SpriteBatch.Draw(_polygonTexture, ConvertUnits.ToDisplayUnits(_compound.Position), null, Color.Tomato, _compound.Rotation, _origin, _scale, SpriteEffects.None, 0f); ScreenManager.SpriteBatch.End(); _border.Draw(); base.Draw(gameTime); }
public override void Draw(GameTime gameTime) { ScreenManager.SpriteBatch.Begin(0, null, null, null, null, null, Camera.View); ScreenManager.SpriteBatch.Draw(_rectangleSprite.Texture, ConvertUnits.ToDisplayUnits(_rectangle.Position), null, Color.White, _rectangle.Rotation, _rectangleSprite.Origin, 1f, SpriteEffects.None, 0f); ScreenManager.SpriteBatch.End(); _border.Draw(); base.Draw(gameTime); }
public override void Draw(GameTime gameTime) { ScreenManager.SpriteBatch.Begin(0, null, null, null, null, null, Camera.View); _agent.Draw(); _circles.Draw(); _rectangles.Draw(); _stars.Draw(); _gears.Draw(); ScreenManager.SpriteBatch.End(); _border.Draw(); base.Draw(gameTime); }
public override void Draw(GameTime gameTime) { ScreenManager.SpriteBatch.Begin(0, null, null, null, null, null, Camera.View); _agent.Draw(); for (int i = 0; i < _spiders.Length; i++) { _spiders[i].Draw(); } ScreenManager.SpriteBatch.End(); _border.Draw(); base.Draw(gameTime); }
public override void Draw(GameTime gameTime) { ScreenManager.SpriteBatch.Begin(0, null, null, null, null, null, Camera.View); for (int i = 0; i < 4; ++i) { ScreenManager.SpriteBatch.Draw(_obstacle.Texture, ConvertUnits.ToDisplayUnits(_obstacles[i].Position), null, Color.White, _obstacles[i].Rotation, _obstacle.Origin, 1f, SpriteEffects.None, 0f); } _ragdoll.Draw(); ScreenManager.SpriteBatch.End(); _border.Draw(); base.Draw(gameTime); }
public override void Draw(GameTime gameTime) { ScreenManager.SpriteBatch.Begin(0, null, null, null, null, null, Camera.View); for (int i = 0; i < 5; ++i) { ScreenManager.SpriteBatch.Draw(_rectangleSprite.Texture, ConvertUnits.ToDisplayUnits(_rectangle[i].Position), null, Color.White, _rectangle[i].Rotation, _rectangleSprite.Origin, 1f, SpriteEffects.None, 0f); } ScreenManager.SpriteBatch.End(); ScreenManager.LineBatch.Begin(Camera.SimProjection, Camera.SimView); for (int i = 0; i < _ramps.Count; ++i) { ScreenManager.LineBatch.DrawLineShape(_ramps[i].FixtureList[0].Shape, Color.DarkGreen); } ScreenManager.LineBatch.End(); _border.Draw(); base.Draw(gameTime); }
public override void Draw(GameTime gameTime) { _border.Draw(); ScreenManager.LineBatch.Begin(Camera.SimProjection, Camera.SimView); for (int i = 0; i < World.BodyList.Count; ++i) { Body b = World.BodyList[i]; if (b.FixtureList.Count == 1 && b.FixtureList[0].ShapeType == ShapeType.Polygon) { PolygonShape s = (PolygonShape)b.FixtureList[0].Shape; Vertices temp = new Vertices(); Transform t; b.GetTransform(out t); for (int j = 0; j < s.Vertices.Count; ++j) { temp.Add(MathUtils.Mul(ref t, s.Vertices[j])); } ScreenManager.LineBatch.DrawVertices(temp); } } for (int i = 0; i < World.BreakableBodyList.Count; ++i) { Transform t; World.BreakableBodyList[i].MainBody.GetTransform(out t); int index = (int)World.BreakableBodyList[i].MainBody.UserData; for (int j = 0; j < _breakableObject[index].Count; ++j) { Vertices temp = new Vertices(); for (int k = 0; k < _breakableObject[index][j].Count; ++k) { temp.Add(MathUtils.Mul(ref t, _breakableObject[index][j][k])); } ScreenManager.LineBatch.DrawVertices(temp); } } ScreenManager.LineBatch.End(); base.Draw(gameTime); }
public override void Draw(GameTime gameTime) { _walker.Draw(); _border.Draw(); base.Draw(gameTime); }