Table of Contents

Class FenceWall

Namespace
TinyLife.Objects
Assembly
Tiny Life.dll

A fence wall is a type of WallLike that works similar to a Wall in placement, but is type-based and doesn't support wallpapering. Fence walls are an official replacement for the deprecated Fence furniture type.

public class FenceWall : WallLike, IGenericDataHolder
Inheritance
JsonTypeSafeGenericDataHolder
FenceWall
Implements
IGenericDataHolder
Inherited Members
JsonTypeSafeGenericDataHolder.GetDataKeys()
Extension Methods

Constructors

FenceWall(FenceType, int[], int, params Point[])

public FenceWall(FenceType type, int[] colors, int floor, params Point[] positions)

Parameters

type FenceType
colors int[]
floor int
positions Point[]

Fields

Colors

The colors indices that this fence has for each of its Type's ColorSchemes.

[DataMember]
public readonly int[] Colors

Field Value

int[]

Type

The FenceType that this fence has.

[DataMember]
public readonly FenceType Type

Field Value

FenceType

Methods

Draw(Map, GameTime, SpriteBatch, Vector2, Color?, bool, bool)

Draws this wall in the world, along with its Opening and potentially Wallpapers or Type.

public override void Draw(Map map, GameTime time, SpriteBatch batch, Vector2 drawPos, Color? overrideColor = null, bool drawOpening = true, bool isInWorld = true)

Parameters

map Map

The map to draw this wall on

time GameTime

The game time

batch SpriteBatch

The sprite batch to draw with

drawPos Vector2

The position to draw the wall at, in draw space

overrideColor Color?

A color that this object should be rendered with, instead of its default color

drawOpening bool

Whether this wall-like object's Opening should be drawn.

isInWorld bool

Whether this wall-like object is currently in the world, or just a preview.

GetPrice()

Returns the price for this wall, including its Opening as well as its Wallpapers or Type.

public override float GetPrice()

Returns

float

The price.

OnNeighborChanged(Map, WallLike)

A method that is called when a neighboring wall of this wall changes. This method is called when a neighboring wall calls NotifyNeighbors(Map).

protected override void OnNeighborChanged(Map map, WallLike neighbor)

Parameters

map Map

The map.

neighbor WallLike

The nighbor that changed.

Validate(Map)

This method is called when this object is loaded from disk.

public override bool Validate(Map map)

Parameters

map Map

Returns

bool

false if the object is not valid, true otherwise