Class Effect
Useful class to save effect-related configs cleanly.
Inheritance
Inherited Members
Namespace: Exiled.API.Features
Assembly: Exiled.API.dll
Syntax
public class Effect
Constructors
| Improve this Doc View SourceEffect()
Initializes a new instance of the Effect class.
Declaration
public Effect()
Effect(StatusEffectBase)
Initializes a new instance of the Effect class.
Declaration
public Effect(StatusEffectBase statusEffectBase)
Parameters
| Type | Name | Description |
|---|---|---|
| CustomPlayerEffects.StatusEffectBase | statusEffectBase | Get all the information of the effect>. |
Effect(EffectType, Single, Byte, Boolean, Boolean)
Initializes a new instance of the Effect class.
Declaration
public Effect(EffectType type, float duration, byte intensity = 1, bool addDurationIfActive = false, bool isEnabled = true)
Parameters
| Type | Name | Description |
|---|---|---|
| EffectType | type | The type of the effect>. |
| System.Single | duration | The duration of the effect, in seconds. |
| System.Byte | intensity | The intensity of the effect. |
| System.Boolean | addDurationIfActive | Whether the effect will add duration onto the effect if already active or not. |
| System.Boolean | isEnabled | Whether or not the effect should be enabled. |
Properties
| Improve this Doc View SourceAddDurationIfActive
Gets or sets a value indicating whether the effect will add duration onto the effect if already active or not.
Declaration
public bool AddDurationIfActive { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
Duration
Gets or sets the effect duration.
Declaration
public float Duration { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Single |
Intensity
Gets or sets the effect intensity.
Declaration
public byte Intensity { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Byte |
IsEnabled
Gets or sets a value indicating whether the effect should be enabled or not.
Declaration
public bool IsEnabled { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
Type
Gets or sets the effect type.
Declaration
public EffectType Type { get; set; }
Property Value
| Type | Description |
|---|---|
| EffectType |
Methods
| Improve this Doc View SourceToString()
Returns the effect in a human-readable format.
Declaration
public override string ToString()
Returns
| Type | Description |
|---|---|
| System.String | A string containing effect-related data. |