Door - Ellpeck/TinyLifeExampleMod Wiki

Tiny Life

TinyLife.World

Door Class

An opening is some sort of extrusion in a Wall, like a window or a door.
Openings are created from their underlying OpeningType.

public class Door : TinyLife.World.Opening

Inheritance System.Object 🡒 Opening 🡒 Door

Derived
SwingingDoor

Constructors

Door.Door(OpeningType, int) Constructor

Creates a new opening from the given opening type and color

public Door(TinyLife.World.OpeningType type, int color);

Parameters

type OpeningType
The opening type

color System.Int32
The index of the color

Methods

Door.CanWalkThrough(Wall, Person) Method

Returns whether a Person is able to walk through a Wall that has this opening.
This returns true for Door and SwingingDoor and false for Opening.

public override bool CanWalkThrough(TinyLife.World.Wall wall, TinyLife.Objects.Person person);

Parameters

wall Wall

person Person

Returns

System.Boolean

Door.IsWindow() Method

Whether the opening is a window that objects with the CanCoverWindow category can be attached to

public override bool IsWindow();

Returns

System.Boolean
Whether the opening is a window