Class Window
A wrapper class for BreakableWindow.
Inheritance
Inherited Members
Namespace: Exiled.API.Features
Assembly: Exiled.API.dll
Syntax
public class Window : IWrapper<BreakableWindow>, IWorldSpace, IPosition, IRotation
Properties
| Improve this Doc View SourceBase
Gets the base-game BreakableWindow for this window.
Declaration
public BreakableWindow Base { get; }
Property Value
Type | Description |
---|---|
BreakableWindow |
DisableScpDamage
Gets or sets a value indicating whether or not this window can be broken by SCP.
Declaration
public bool DisableScpDamage { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
GameObject
Gets the UnityEngine.GameObject of the window.
Declaration
public GameObject GameObject { get; }
Property Value
Type | Description |
---|---|
UnityEngine.GameObject |
Health
Gets or sets if the window's remaining health. No effect if the window cannot be broken.
Declaration
public float Health { get; set; }
Property Value
Type | Description |
---|---|
System.Single |
IsBreakable
Gets a value indicating whether or not this window is breakable.
Declaration
public bool IsBreakable { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
IsBroken
Gets or sets a value indicating whether or not this window is broken.
Declaration
public bool IsBroken { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
LastAttacker
Gets or sets a value indicating who is the LastAttacker.
Declaration
public Player LastAttacker { get; set; }
Property Value
Type | Description |
---|---|
Player |
List
Declaration
public static IReadOnlyCollection<Window> List { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IReadOnlyCollection<Window> |
Position
Gets or sets the window's position.
Declaration
public Vector3 Position { get; set; }
Property Value
Type | Description |
---|---|
UnityEngine.Vector3 |
Room
Gets the Room the window is in.
Declaration
public Room Room { get; }
Property Value
Type | Description |
---|---|
Room |
Rotation
Gets or sets the window's rotation.
Declaration
public Quaternion Rotation { get; set; }
Property Value
Type | Description |
---|---|
UnityEngine.Quaternion |
SyncStatus
Gets or sets a value indicating whether or not this window is broken.
Declaration
public BreakableWindow.BreakableWindowStatus SyncStatus { get; set; }
Property Value
Type | Description |
---|---|
BreakableWindow.BreakableWindowStatus |
Transform
Gets the window's UnityEngine.Transform.
Declaration
public Transform Transform { get; }
Property Value
Type | Description |
---|---|
UnityEngine.Transform |
Type
Gets the window's GlassType.
Declaration
public GlassType Type { get; }
Property Value
Type | Description |
---|---|
GlassType |
Zone
Gets the window's ZoneType.
Declaration
public ZoneType Zone { get; }
Property Value
Type | Description |
---|---|
ZoneType |
Methods
| Improve this Doc View SourceBreakWindow()
Break the window.
Declaration
public void BreakWindow()
DamageWindow(Single)
Damages the window.
Declaration
public void DamageWindow(float amount)
Parameters
Type | Name | Description |
---|---|---|
System.Single | amount | The amount of damage to deal. |
DamageWindow(Single, DamageHandlerBase)
Damages the window.
Declaration
public void DamageWindow(float amount, DamageHandlerBase handler)
Parameters
Type | Name | Description |
---|---|---|
System.Single | amount | The amount of damage to deal. |
DamageHandlerBase | handler | 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.
Declaration
public static Window Get(BreakableWindow breakableWindow)
Parameters
Type | Name | Description |
---|---|---|
BreakableWindow | breakableWindow | The base-game Window. |
Returns
Type | Description |
---|---|
Window | A Door wrapper object. |
Get(Func<Window, Boolean>)
Gets a System.Collections.Generic.IEnumerable<T> of Window filtered based on a predicate.
Declaration
public static IEnumerable<Window> Get(Func<Window, bool> predicate)
Parameters
Type | Name | Description |
---|---|---|
System.Func<Window, System.Boolean> | predicate | The condition to satify. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<Window> | A System.Collections.Generic.IEnumerable<T> of Window which contains elements that satify the condition. |
ToString()
Returns the Window in a human-readable format.
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
System.String | A string containing Window-related data. |
Overrides
TryGet(BreakableWindow, out Window)
Try-get a Window belonging to the BreakableWindow, if any.
Declaration
public static bool TryGet(BreakableWindow breakableWindow, out Window window)
Parameters
Type | Name | Description |
---|---|---|
BreakableWindow | breakableWindow | The BreakableWindow instance. |
Window | window | A Window or null if not found. |
Returns
Type | Description |
---|---|
System.Boolean | Whether or not a window was found. |
TryGet(Func<Window, Boolean>, out IEnumerable<Window>)
Try-get a System.Collections.Generic.IEnumerable<T> of Window filtered based on a predicate.
Declaration
public static bool TryGet(Func<Window, bool> predicate, out IEnumerable<Window> windows)
Parameters
Type | Name | Description |
---|---|---|
System.Func<Window, System.Boolean> | predicate | The condition to satify. |
System.Collections.Generic.IEnumerable<Window> | windows | A System.Collections.Generic.IEnumerable<T> of Window which contains elements that satify the condition. |
Returns
Type | Description |
---|---|
System.Boolean | Whether or not at least one window was found. |