Search Results for

    Show / Hide Table of Contents

    Class Hazard

    A wrapper for Hazards.EnvironmentalHazard.

    Inheritance
    System.Object
    TypeCastObject<Hazard>
    Hazard
    SinkholeHazard
    TemporaryHazard
    Implements
    IWrapper<Hazards.EnvironmentalHazard>
    Inherited Members
    TypeCastObject<Hazard>.Cast<TObject>()
    TypeCastObject<Hazard>.Cast<TObject>(TObject)
    TypeCastObject<Hazard>.As<TObject>()
    TypeCastObject<Hazard>.Is<TObject>(TObject)
    System.Object.ToString()
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    Namespace: Exiled.API.Features.Hazards
    Assembly: Exiled.API.dll
    Syntax
    public class Hazard : TypeCastObject<Hazard>, IWrapper<EnvironmentalHazard>

    Constructors

    | Improve this Doc View Source

    Hazard(EnvironmentalHazard)

    Initializes a new instance of the Hazard class.

    Declaration
    public Hazard(EnvironmentalHazard hazard)
    Parameters
    Type Name Description
    Hazards.EnvironmentalHazard hazard

    The Hazards.EnvironmentalHazard instance.

    Properties

    | Improve this Doc View Source

    AffectedPlayers

    Gets or sets the list with all affected by this hazard players.

    Declaration
    public IEnumerable<Player> AffectedPlayers { get; set; }
    Property Value
    Type Description
    System.Collections.Generic.IEnumerable<Player>
    | Improve this Doc View Source

    Base

    Gets the Hazards.EnvironmentalHazard.

    Declaration
    public EnvironmentalHazard Base { get; }
    Property Value
    Type Description
    Hazards.EnvironmentalHazard
    | Improve this Doc View Source

    IsActive

    Gets a value indicating whether or not hazard is active.

    Declaration
    public bool IsActive { get; }
    Property Value
    Type Description
    System.Boolean
    | Improve this Doc View Source

    List

    Gets the list of all hazards.

    Declaration
    public static IReadOnlyCollection<Hazard> List { get; }
    Property Value
    Type Description
    System.Collections.Generic.IReadOnlyCollection<Hazard>
    | Improve this Doc View Source

    MaxDistance

    Gets or sets max hazard distance.

    Declaration
    public float MaxDistance { get; set; }
    Property Value
    Type Description
    System.Single
    | Improve this Doc View Source

    MaxHeightDistance

    Gets or sets max hazard height.

    Declaration
    public float MaxHeightDistance { get; set; }
    Property Value
    Type Description
    System.Single
    | Improve this Doc View Source

    Position

    Gets or sets the position.

    Declaration
    public Vector3 Position { get; set; }
    Property Value
    Type Description
    UnityEngine.Vector3
    | Improve this Doc View Source

    PositionOffset

    Gets or sets offset for position.

    Declaration
    public Vector3 PositionOffset { get; set; }
    Property Value
    Type Description
    UnityEngine.Vector3
    | Improve this Doc View Source

    Room

    Gets the room where this hazard is located.

    Declaration
    public Room Room { get; }
    Property Value
    Type Description
    Room

    Methods

    | Improve this Doc View Source

    Get(Room)

    Gets the hazard by the room where it's located.

    Declaration
    public static Hazard Get(Room room)
    Parameters
    Type Name Description
    Room room

    Room.

    Returns
    Type Description
    Hazard

    Hazard in given Room.

    | Improve this Doc View Source

    Get(EnvironmentalHazard)

    Gets the Hazard by Hazards.EnvironmentalHazard.

    Declaration
    public static Hazard Get(EnvironmentalHazard environmentalHazard)
    Parameters
    Type Name Description
    Hazards.EnvironmentalHazard environmentalHazard

    The Hazards.EnvironmentalHazard instance.

    Returns
    Type Description
    Hazard

    Hazard for Hazards.EnvironmentalHazard.

    | Improve this Doc View Source

    Get(Func<Hazard, Boolean>)

    Gets the System.Collections.Generic.IEnumerable<T> of Hazard based on predicate.

    Declaration
    public static IEnumerable<Hazard> Get(Func<Hazard, bool> predicate)
    Parameters
    Type Name Description
    System.Func<Hazard, System.Boolean> predicate

    Condition to satisfy.

    Returns
    Type Description
    System.Collections.Generic.IEnumerable<Hazard>

    System.Collections.Generic.IEnumerable<T> of Hazard based on predicate.

    | Improve this Doc View Source

    Get(GameObject)

    Gets the hazard by it's UnityEngine.GameObject.

    Declaration
    public static Hazard Get(GameObject obj)
    Parameters
    Type Name Description
    UnityEngine.GameObject obj

    Game object.

    Returns
    Type Description
    Hazard

    Hazard in given Room.

    | Improve this Doc View Source

    IsInArea(Player)

    Checks if player is in hazard zone.

    Declaration
    public bool IsInArea(Player player)
    Parameters
    Type Name Description
    Player player

    Player to check.

    Returns
    Type Description
    System.Boolean

    true if player is in hazard zone. Otherwise, false.

    Implements

    IWrapper<T>

    Extension Methods

    ReflectionExtensions.CopyProperties(Object, Object)
    • Improve this Doc
    • View Source
    In This Article
    Back to top Generated by DocFX