Class OverlayWallHanging
A class for a wall-hung object like LgbtFlags and WorkoutPosters. Objects that use this class have a default "border" texture that requires all rotations to be present as usual, and an overlay texture that automatically gets rotated and mirrored. To set a default border texture that is different from the overlay, TextureName should be set explicitly.
public class OverlayWallHanging : Furniture, IGenericDataHolder
- Inheritance
-
JsonTypeSafeGenericDataHolderOverlayWallHanging
- Implements
-
IGenericDataHolder
- Inherited Members
-
JsonTypeSafeGenericDataHolder.GetDataKeys()
- Extension Methods
Constructors
OverlayWallHanging(Guid, FurnitureType, int[], Map, Vector2, float)
Creates a new furniture instance. By default, this is done using Construct<T>(int[], Map, Vector2, float, Guid?).
public OverlayWallHanging(Guid id, FurnitureType type, int[] colors, Map map, Vector2 pos, float floor)
Parameters
idGuidThe id to apply to the created furniture instance
typeFurnitureTypeThe type to create an instance of
colorsint[]The colors to apply to the furniture
mapMapThe map to create the furniture on
posVector2The position that the furniture should have
floorfloatThe floor that this object is on.
Methods
Draw(GameTime, object, Vector2, float, Vector2, Color?, Direction2, int[], float, bool, ParentInfo, float, List<Item>)
Draws this furniture in the world with the given settings. When overriding this method, furniture objects should use DrawColumns(Map, Vector2, float, object, Vector2, TextureRegion, Color, Vector2, Point, List<Item>, bool, ParentInfo, float, SpriteEffects, bool) for drawing their textures or alternatively manually calculate the depth to draw with using GetDepth(Vector2, float, float, bool, bool, bool). This is a more generalized version of Draw(GameTime, object, Vector2, Color?, List<Item>).
public override void Draw(GameTime time, object batch, Vector2 pos, float floor, Vector2 drawPos, Color? overrideColor, Direction2 rotation, int[] colors, float drawScale, bool pivot, ParentInfo parent, float depthOffset, List<StaticSpriteBatch.Item> items)
Parameters
timeGameTimeThe game time
batchobjectThe sprite batch to draw with, which is either a Microsoft.Xna.Framework.Graphics.SpriteBatch or MLEM.Graphics.StaticSpriteBatch.
posVector2The position, in world space, that the furniture is at
floorfloatThe floor to draw at.
drawPosVector2The position, in draw space, to draw the furniture at
overrideColorColor?An optional color to override the default colors of the furniture
rotationDirection2The rotation that the furniture should be drawn with.
colorsint[]The colors to draw the furniture with
drawScalefloatThe scale to draw the furniture with
pivotboolWhether or not to move the furniture by its texture's pivot point
parentParentInfoThe object that this furniture is latched on to, or null if there is none
depthOffsetfloatA value that is added onto the calculated depth of the object
itemsList<StaticSpriteBatch.Item>A list of sprite batch items that items should be added to if the
batchis a MLEM.Graphics.StaticSpriteBatch.