Class TeslaGate
The in-game tesla gate.
Inheritance
Inherited Members
Namespace: Exiled.API.Features
Assembly: Exiled.API.dll
Syntax
public class TeslaGate : IWrapper<TeslaGate>, IWorldSpace, IPosition, IRotation
Properties
| Improve this Doc View SourceActivationTime
Gets or sets the tesla gate's windup time to wait before generating the shock.
Declaration
public float ActivationTime { get; set; }
Property Value
Type | Description |
---|---|
System.Single |
Base
Gets the base TeslaGate.
Declaration
public TeslaGate Base { get; }
Property Value
Type | Description |
---|---|
TeslaGate |
CooldownTime
Gets or sets the tesla gate's cooldown to wait before the next shock.
Declaration
public float CooldownTime { get; set; }
Property Value
Type | Description |
---|---|
System.Single |
GameObject
Gets the tesla gate's UnityEngine.GameObject.
Declaration
public GameObject GameObject { get; }
Property Value
Type | Description |
---|---|
UnityEngine.GameObject |
HurtRange
Gets or sets the tesla gate's radius from which players can be hurted.
Declaration
public Vector3 HurtRange { get; set; }
Property Value
Type | Description |
---|---|
UnityEngine.Vector3 |
IdleRange
Gets or sets the tesla gate's distance from which players must stand for it to enter idle mode.
Declaration
public float IdleRange { get; set; }
Property Value
Type | Description |
---|---|
System.Single |
IgnoredPlayers
Gets or sets a System.Collections.Generic.HashSet<T> of Player which contains all the players ignored by tesla gates.
Declaration
public static HashSet<Player> IgnoredPlayers { get; set; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.HashSet<Player> |
IgnoredRoles
Gets or sets a System.Collections.Generic.HashSet<T> of PlayerRoles.RoleTypeId which contains all the roles ignored by tesla gates.
Declaration
public static List<RoleTypeId> IgnoredRoles { get; set; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.List<PlayerRoles.RoleTypeId> |
IgnoredTeams
Gets or sets a System.Collections.Generic.HashSet<T> of PlayerRoles.Team which contains all the teams ignored by tesla gates.
Declaration
public static List<Team> IgnoredTeams { get; set; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.List<PlayerRoles.Team> |
InactiveTime
Gets or sets the tesla gate's inactive time.
Declaration
public float InactiveTime { get; set; }
Property Value
Type | Description |
---|---|
System.Single |
IsIdling
Gets or sets a value indicating whether the tesla gate is idling.
Declaration
public bool IsIdling { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
IsShocking
Gets a value indicating whether or not the tesla gate's shock burst is in progess.
Declaration
public bool IsShocking { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
List
Gets a System.Collections.Generic.IEnumerable<T> of TeslaGate which contains all the TeslaGate instances.
Declaration
public static IReadOnlyCollection<TeslaGate> List { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IReadOnlyCollection<TeslaGate> |
PlayersInHurtRange
Gets a System.Collections.Generic.IEnumerable<T> of Player which contains all the players inside the hurt range.
Declaration
public IEnumerable<Player> PlayersInHurtRange { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<Player> |
PlayersInIdleRange
Gets a System.Collections.Generic.IEnumerable<T> of Player which contains all the players inside the idle range.
Declaration
public IEnumerable<Player> PlayersInIdleRange { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<Player> |
PlayersInTriggerRange
Gets a System.Collections.Generic.IEnumerable<T> of Player which contains all the players inside the trigger range.
Declaration
public IEnumerable<Player> PlayersInTriggerRange { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<Player> |
Position
Gets the tesla gate's position.
Declaration
public Vector3 Position { get; }
Property Value
Type | Description |
---|---|
UnityEngine.Vector3 |
Room
Gets the tesla gate's Room which is located in.
Declaration
public Room Room { get; }
Property Value
Type | Description |
---|---|
Room |
Rotation
Gets the tesla gate's rotation.
Declaration
public Quaternion Rotation { get; }
Property Value
Type | Description |
---|---|
UnityEngine.Quaternion |
TantrumsToDestroy
Gets a System.Collections.Generic.List<T> of TantrumHazard which contains all the tantrums to destroy.
Declaration
public IEnumerable<TantrumHazard> TantrumsToDestroy { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<TantrumHazard> |
Transform
Gets the tesla gate's UnityEngine.Transform.
Declaration
public Transform Transform { get; }
Property Value
Type | Description |
---|---|
UnityEngine.Transform |
TriggerRange
Gets or sets the tesla gate's distance from which can be triggered.
Declaration
public float TriggerRange { get; set; }
Property Value
Type | Description |
---|---|
System.Single |
UseInstantBurst
Gets or sets a value indicating whether or not the tesla gate's next burst should be treated as instant burst.
The instant burst ignores the standard cooldown time, reducing it to the cooldown time used for bursts triggered by SCP-079.
Declaration
public bool UseInstantBurst { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
Methods
| Improve this Doc View SourceCanBeIdle(Player)
Gets a value indicating whether the tesla gate can be idle by a specific Player.
Declaration
public bool CanBeIdle(Player player)
Parameters
Type | Name | Description |
---|---|---|
Player | player | The Player to check. |
Returns
Type | Description |
---|---|
System.Boolean | true if the given Player can idle the tesla gate; otherwise, false. |
CanBeTriggered(Player)
Gets a value indicating whether the tesla gate can be triggered by a specific Player.
Declaration
public bool CanBeTriggered(Player player)
Parameters
Type | Name | Description |
---|---|---|
Player | player | The Player to check. |
Returns
Type | Description |
---|---|
System.Boolean | true if the given Player can trigger the tesla gate; otherwise, false. |
ForceTrigger()
Force triggers the tesla gate ignoring the delay between each burst.
Declaration
public void ForceTrigger()
Get(Func<TeslaGate, Boolean>)
Gets a System.Collections.Generic.IEnumerable<T> of TeslaGate filtered based on a predicate.
Declaration
public static IEnumerable<TeslaGate> Get(Func<TeslaGate, bool> predicate)
Parameters
Type | Name | Description |
---|---|---|
System.Func<TeslaGate, System.Boolean> | predicate | The condition to satify. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<TeslaGate> | A System.Collections.Generic.IEnumerable<T> of TeslaGate which contains elements that satify the condition. |
Get(TeslaGate)
Gets the TeslaGate belonging to the TeslaGate.
Declaration
public static TeslaGate Get(TeslaGate baseTeslaGate)
Parameters
Type | Name | Description |
---|---|---|
TeslaGate | baseTeslaGate | The TeslaGate instance. |
Returns
Type | Description |
---|---|
TeslaGate | The corresponding TeslaGate instance. |
IsPlayerInHurtRange(Player)
Gets a value indicating whether the Player is in the hurt range of a specific tesla gate.
Declaration
public bool IsPlayerInHurtRange(Player player)
Parameters
Type | Name | Description |
---|---|---|
Player | player | The Player to check. |
Returns
Type | Description |
---|---|
System.Boolean | true if the given Player is in the hurt range of the tesla gate; otherwise, false. |
IsPlayerInIdleRange(Player)
Gets a value indicating whether the Player is in the idle range of a specific tesla gate.
Declaration
public bool IsPlayerInIdleRange(Player player)
Parameters
Type | Name | Description |
---|---|---|
Player | player | The Player to check. |
Returns
Type | Description |
---|---|
System.Boolean | true if the given Player is in the idle range of the tesla gate; otherwise, false. |
IsPlayerInTriggerRange(Player)
Gets a value indicating whether the Player is in the trigger range of a specific tesla gate.
Declaration
public bool IsPlayerInTriggerRange(Player player)
Parameters
Type | Name | Description |
---|---|---|
Player | player | The Player to check. |
Returns
Type | Description |
---|---|
System.Boolean | true if the given Player is in the trigger range of the tesla gate; otherwise, false. |
Trigger(Boolean)
Triggers the tesla gate.
Declaration
public void Trigger(bool isInstantBurst = false)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | isInstantBurst | A value indicating whether the shock should be treated as instant burst. |
TryGet(Func<TeslaGate, Boolean>, out IEnumerable<TeslaGate>)
Try-get a System.Collections.Generic.IEnumerable<T> of TeslaGate filtered based on a predicate.
Declaration
public static bool TryGet(Func<TeslaGate, bool> predicate, out IEnumerable<TeslaGate> gates)
Parameters
Type | Name | Description |
---|---|---|
System.Func<TeslaGate, System.Boolean> | predicate | The condition to satify. |
System.Collections.Generic.IEnumerable<TeslaGate> | gates | A System.Collections.Generic.IEnumerable<T> of TeslaGate which contains elements that satify the condition. |
Returns
Type | Description |
---|---|
System.Boolean | Whether or not at least one tesla gate was found. |
TryGet(TeslaGate, out TeslaGate)
Try-get a TeslaGate belonging to the TeslaGate, if any.
Declaration
public static bool TryGet(TeslaGate baseTeslaGate, out TeslaGate gate)
Parameters
Type | Name | Description |
---|---|---|
TeslaGate | baseTeslaGate | The TeslaGate instance. |
TeslaGate | gate | A TeslaGate or null if not found. |
Returns
Type | Description |
---|---|
System.Boolean | Whether or not the tesla gate was found. |