public override void Draw(SpriteBatch batch) { foreach (MovementTile t in movement) { t.Draw(batch); } if (ActiveLayer) { Rectangle wSize = Game1.Instance.fontRenderer.StringSize(GetMovementChar()); if (dragging) { Game1.Instance.fontRenderer.DrawText(batch, new Vector2((tileSize.X + tileSize.Width / 2) - wSize.Width / 2, (tileSize.Y + tileSize.Height / 2) - wSize.Height), GetMovementChar()); RectangleRender.Draw(batch, tileSize); } else { Game1.Instance.fontRenderer.DrawText(batch, new Vector2(tileSize.X - wSize.Width / 2, tileSize.Y - wSize.Height), GetMovementChar()); } } base.Draw(batch); }
public void Draw(SpriteBatch batch) { if (Game1.Instance.CreatorMode) { RectangleRender.Draw(batch, Bounds); } }
/// <summary> /// Draw the image of the object /// </summary> /// <param name="batch">The active spritebatch</param> public virtual void Draw(SpriteBatch batch) { if (image != null) { if (useCustomBounds) { // Draw the whole image with custom bounds batch.Draw(image, new Rectangle((int)position.X, (int)position.Y, image.Width, image.Height), Color.White); } else { // no custom bounds mean hitbox contains the position and the image size batch.Draw(image, hitbox, Color.White); } } else if (Animation != null) { Animation.Draw(batch, position); } if (Game1.Instance.CreatorMode) { RectangleRender.Draw(batch, hitbox); } }
public void Draw(SpriteBatch batch) { if (inLevelCreator) { RectangleRender.Draw(batch, Bounds); Game1.Instance.fontRenderer.DrawText(batch, new Vector2((Bounds.X + Bounds.Width / 2) - wSize.Width / 2, (Bounds.Y + Bounds.Height / 2) - wSize.Height), GetMovementChar()); } }
public void Draw(SpriteBatch batch) { animations[currentMovement].Draw(batch, position); if (Game1.Instance.CreatorMode) { RectangleRender.Draw(batch, Boundingbox); } }
public void Draw(SpriteBatch batch) { batch.Draw(overlay, Game1.Instance.ScreenRect, Color.White); if (dragging) { RectangleRender.Draw(batch, boundingboxDraw); } if (player != null) { player.Draw(batch); } }
public void DrawCenter(Texture2D t, SpriteBatch batch) { batch.Draw(t, leftTopImg, Color.White); RectangleRender.Draw(batch, boundingboxDraw, Color.White); }