public override void Draw(Happiness.Texture2D texture, Happiness.Vector2?position = default(Happiness.Vector2?), Happiness.Rectangle?destinationRectangle = default(Happiness.Rectangle?), Happiness.Rectangle?sourceRectangle = default(Happiness.Rectangle?), Happiness.Vector2?origin = default(Happiness.Vector2?), float rotation = 0, Happiness.Vector2?scale = default(Happiness.Vector2?), Happiness.Color?color = default(Happiness.Color?), Happiness.SpriteEffects effects = Happiness.SpriteEffects.None, float layerDepth = 0) { Texture2D_XNA t = (Texture2D_XNA)texture; Vector2? positionV2 = (position.HasValue ? HappinessV2ToXNAV2(position.Value) : (Vector2?)null); Rectangle? dstRect = (destinationRectangle.HasValue ? HappinessRectToXNARect(destinationRectangle.Value) : (Rectangle?)null); Rectangle? srcRect = (sourceRectangle.HasValue ? HappinessRectToXNARect(sourceRectangle.Value) : (Rectangle?)null); Vector2? originV2 = (origin.HasValue ? HappinessV2ToXNAV2(origin.Value) : (Vector2?)null); Vector2? scaleV2 = (scale.HasValue ? HappinessV2ToXNAV2(scale.Value) : (Vector2?)null); _sb.Draw(t.XNATexture, positionV2, dstRect, srcRect, originV2, rotation, scaleV2, HappinessColorToXNAColor(color.Value), (SpriteEffects)effects, layerDepth); }
public override void Draw(Happiness.Texture2D texture, Happiness.Rectangle destinationRectangle, Happiness.Rectangle?sourceRectangle, Happiness.Color color, float rotation, Happiness.Vector2 origin, Happiness.SpriteEffects effects, float layerDepth) { Texture2D_XNA t = (Texture2D_XNA)texture; Rectangle? srcRect = (sourceRectangle.HasValue ? HappinessRectToXNARect(sourceRectangle.Value) : (Rectangle?)null); _sb.Draw(t.XNATexture, HappinessRectToXNARect(destinationRectangle), srcRect, HappinessColorToXNAColor(color), rotation, HappinessV2ToXNAV2(origin), (SpriteEffects)effects, layerDepth); }