public void Draw(Physics.BoundingBox box) { _textureRenderer.Draw( _dummyTexture, new Vector2(box.XMin + box.Width / 2.0f, box.YMin + box.Height / 2.0f), rotation: 0, textureScale: new Vector2(box.Width, box.Height) * Constants.PixelSize ); }
public void Draw(Character character, CharacterTypes type) { _renderer.Begin(); var sprite = _textureLookup[(int)type]; var position = character.Position; _renderer.Draw(sprite, new Vector2(position.X, position.Y)); _renderer.End(); }
/// <summary> Draws all of the grids that are around the center of the camera. </summary> public void Draw() { _renderer.Begin(); foreach (var item in _worldView.VisibleGridItems.Data) { if (item.GridItem.Type == TileType.Default) { continue; } var sprite = GetSprite(item.GridItem); var rotation = (float)Math.PI / 2.0f * item.GridItem.Variant; _renderer.Draw(sprite, new Vector2(item.Position.X + .5f, item.Position.Y + .5f), rotation); } _renderer.End(); }