Class Window
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
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
IsBreakable
Gets a value indicating whether this window is breakable.
public bool IsBreakable { get; }
Property Value
IsBroken
Gets or sets a value indicating whether this window is broken.
public bool IsBroken { get; set; }
Property Value
LastAttacker
Gets or sets a value indicating who is the LastAttacker.
public Player LastAttacker { get; set; }
Property Value
List
Gets a IEnumerable<T> of Door which contains all the Door instances.
public static IReadOnlyCollection<Window> List { get; }
Property Value
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
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
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
Zone
Gets the window's ZoneType.
public ZoneType Zone { get; }
Property Value
Methods
BreakWindow()
Break the window.
public void BreakWindow()
DamageWindow(float)
Damages the window.
public void DamageWindow(float amount)
Parameters
amount
floatThe amount of damage to deal.
DamageWindow(float, DamageHandlerBase)
Damages the window.
public void DamageWindow(float amount, DamageHandlerBase handler)
Parameters
amount
floatThe amount of damage to deal.
handler
DamageHandlerBaseThe 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
BreakableWindowThe base-game Window.
Returns
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
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
BreakableWindowThe BreakableWindow instance.
window
Window
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.