public void Draw(SpriteBatchS spriteBatch, Vector2 position, float scale = 1f) { PrivateDraw(spriteBatch, frame, position, null, Color.White, 0f, default, new Vector2(1, 1) * scale, SpriteEffects.None, 0f);
/// <summary> /// The Actual Call of Draw methods, can be overriden /// </summary> protected virtual void PrivateDraw(SpriteBatchS spriteBatch, int frame, Vector2 position, Rectangle?source, Color color, float rotation, Vector2 origin, Vector2 scale, SpriteEffects effects, float layerDepth) { EnsureGenerated(); spriteBatch.Draw(_texture[frame], position, source, color, rotation, origin, scale, effects, layerDepth); }
public void Draw(SpriteBatchS spriteBatch, int frame, SpriteDrawInfo spriteDrawInfo) { PrivateDraw(spriteBatch, frame, spriteDrawInfo.position, spriteDrawInfo.sourceRectangle, spriteDrawInfo.color, spriteDrawInfo.rotation, spriteDrawInfo.origin, spriteDrawInfo.scale, spriteDrawInfo.effects, spriteDrawInfo.layerDepth); }
public void Draw(SpriteBatchS spriteBatch, Vector2 position, Vector2 vector, float scale) { EnsureInstancedTexture(); arrowTexture.Draw(spriteBatch, position + vector, null, color, vector.Angle() + 1.571f, arrowTexture.Size / 2, scale, SpriteEffects.None, 1f); arrowBodyTexture.Draw(spriteBatch, position, null, color, vector.Angle() - 1.571f, new Vector2(arrowBodyTexture.Width / 2, 0), new Vector2(1, vector.Length()) * scale, SpriteEffects.None, 1f); }