Table of Contents

Class Window

Namespace
Exiled.API.Features
Assembly
Exiled.API.dll

A wrapper class for BreakableWindow.

public class Window : IWrapper<BreakableWindow>, IWorldSpace, IPosition, IRotation
Inheritance
Window
Implements
IWrapper<BreakableWindow>
Inherited Members
Extension Methods

Properties

Base

Gets the base-game BreakableWindow for this window.

public BreakableWindow Base { get; }

Property Value

BreakableWindow

DisableScpDamage

Gets or sets a value indicating whether this window can be broken by SCP.

public bool DisableScpDamage { get; set; }

Property Value

bool

GameObject

Gets the UnityEngine.GameObject of the window.

public GameObject GameObject { get; }

Property Value

GameObject

Health

Gets or sets if the window's remaining health. No effect if the window cannot be broken.

public float Health { get; set; }

Property Value

float

IsBreakable

Gets a value indicating whether this window is breakable.

public bool IsBreakable { get; }

Property Value

bool

IsBroken

Gets or sets a value indicating whether this window is broken.

public bool IsBroken { get; set; }

Property Value

bool

LastAttacker

Gets or sets a value indicating who is the LastAttacker.

public Player LastAttacker { get; set; }

Property Value

Player

List

Gets a IEnumerable<T> of Door which contains all the Door instances.

public static IReadOnlyCollection<Window> List { get; }

Property Value

IReadOnlyCollection<Window>

Position

Gets or sets the window's position.

public Vector3 Position { get; set; }

Property Value

Vector3

Room

Gets the Room the window is in.

public Room Room { get; }

Property Value

Room

Rotation

Gets or sets the window's rotation.

public Quaternion Rotation { get; set; }

Property Value

Quaternion

SyncStatus

Gets or sets a value indicating whether this window is broken.

public bool SyncStatus { get; set; }

Property Value

bool

Transform

Gets the window's UnityEngine.Transform.

public Transform Transform { get; }

Property Value

Transform

Type

Gets the window's GlassType.

public GlassType Type { get; }

Property Value

GlassType

Zone

Gets the window's ZoneType.

public ZoneType Zone { get; }

Property Value

ZoneType

Methods

BreakWindow()

Break the window.

public void BreakWindow()

DamageWindow(float)

Damages the window.

public void DamageWindow(float amount)

Parameters

amount float

The amount of damage to deal.

DamageWindow(float, DamageHandlerBase)

Damages the window.

public void DamageWindow(float amount, DamageHandlerBase handler)

Parameters

amount float

The amount of damage to deal.

handler DamageHandlerBase

The handler of damage.

Get(BreakableWindow)

Gets the window object associated with a specific Window, or creates a new one if there isn't one.

public static Window Get(BreakableWindow breakableWindow)

Parameters

breakableWindow BreakableWindow

The base-game Window.

Returns

Window

A Door wrapper object.

Get(Func<Window, bool>)

Gets a IEnumerable<T> of Window filtered based on a predicate.

public static IEnumerable<Window> Get(Func<Window, bool> predicate)

Parameters

predicate Func<Window, bool>

The condition to satisfy.

Returns

IEnumerable<Window>

A IEnumerable<T> of Window which contains elements that satify the condition.

ToString()

Returns the Window in a human-readable format.

public override string ToString()

Returns

string

A string containing Window-related data.

TryGet(BreakableWindow, out Window)

Try-get a Window belonging to the BreakableWindow, if any.

public static bool TryGet(BreakableWindow breakableWindow, out Window window)

Parameters

breakableWindow BreakableWindow

The BreakableWindow instance.

window Window

A Window or null if not found.

Returns

bool

Whether a window was found.

TryGet(Func<Window, bool>, out IEnumerable<Window>)

Try-get a IEnumerable<T> of Window filtered based on a predicate.

public static bool TryGet(Func<Window, bool> predicate, out IEnumerable<Window> windows)

Parameters

predicate Func<Window, bool>

The condition to satisfy.

windows IEnumerable<Window>

A IEnumerable<T> of Window which contains elements that satify the condition.

Returns

bool

Whether at least one window was found.