1 using Microsoft.Xna.Framework;
2 using Microsoft.Xna.Framework.Graphics;
7 partial class Ladder : ItemComponent, IDrawableComponent
17 get {
return Vector2.Zero; }
20 private Sprite backgroundSprite;
22 public void Draw(SpriteBatch spriteBatch,
bool editing,
float itemDepth = -1, Color? overrideColor =
null)
24 if (backgroundSprite ==
null) {
return; }
36 var backgroundSpriteElement = element.
GetChildElement(
"backgroundsprite");
37 if (backgroundSpriteElement !=
null)
39 backgroundSprite =
new Sprite(backgroundSpriteElement);
43 partial
void RemoveProjSpecific()
45 backgroundSprite?.
Remove();
46 backgroundSprite =
null;
ContentXElement? GetChildElement(string name)
virtual Vector2 DrawPosition
float BackgroundSpriteDepth
void Draw(SpriteBatch spriteBatch, bool editing, float itemDepth=-1, Color? overrideColor=null)
void DrawTiled(ISpriteBatch spriteBatch, Vector2 position, Vector2 targetSize, float rotation=0f, Vector2? origin=null, Color? color=null, Vector2? startOffset=null, Vector2? textureScale=null, float? depth=null, SpriteEffects? spriteEffects=null)