Class Effect
Useful class to save effect-related configs cleanly.
public class Effect
- Inheritance
-
Effect
- Inherited Members
- Extension Methods
Constructors
Effect()
Initializes a new instance of the Effect class.
public Effect()
Effect(StatusEffectBase)
Initializes a new instance of the Effect class.
public Effect(StatusEffectBase statusEffectBase)
Parameters
statusEffectBase
StatusEffectBaseGet all the information of the effect>.
Effect(EffectType, float, byte, bool, bool)
Initializes a new instance of the Effect class.
public Effect(EffectType type, float duration, byte intensity = 1, bool addDurationIfActive = false, bool isEnabled = true)
Parameters
type
EffectTypeThe type of the effect>.
duration
floatThe duration of the effect, in seconds.
intensity
byteThe intensity of the effect.
addDurationIfActive
boolWhether the effect will add duration onto the effect if already active or not.
isEnabled
boolWhether the effect should be enabled.
Properties
AddDurationIfActive
Gets or sets a value indicating whether the effect will add duration onto the effect if already active or not.
public bool AddDurationIfActive { get; set; }
Property Value
Duration
Gets or sets the effect duration.
public float Duration { get; set; }
Property Value
Intensity
Gets or sets the effect intensity.
public byte Intensity { get; set; }
Property Value
IsEnabled
Gets or sets a value indicating whether the effect should be enabled.
public bool IsEnabled { get; set; }
Property Value
Type
Gets or sets the effect type.
public EffectType Type { get; set; }
Property Value
Methods
ToString()
Returns the effect in a human-readable format.
public override string ToString()
Returns
- string
A string containing effect-related data.