Class AEffect
- Namespace
- AO
- Assembly
- CoreAssembly.dll
Base class for effects that can be added to players.
public abstract class AEffect : Component, INetworkedComponent
- Inheritance
-
AEffect
- Implements
- Derived
- Inherited Members
- Extension Methods
Fields
Ability
The ability responsible for the effect
public Ability Ability
Field Value
AbilityDirection
public Vector2 AbilityDirection
Field Value
AbilityIndex
public int AbilityIndex
Field Value
AbilityMagnitude
public float AbilityMagnitude
Field Value
Caster
The player who cast this effect, if any.
public Player Caster
Field Value
DurationProgress01
The percentage progress of the effect's duration, from 0 to 1.
public float DurationProgress01
Field Value
DurationRemaining
The remaining duration of the effect, in seconds.
public float DurationRemaining
Field Value
ElapsedTime
How long this effect has been running.
public float ElapsedTime
Field Value
InitialDuration
The initial duration of the effect, in seconds.
public float InitialDuration
Field Value
Player
The player who has this effect.
public Player Player
Field Value
Properties
AbilityWhitelist
Whitelist of ability types that can still be used if BlockAbilityActivation is true
public virtual List<Type> AbilityWhitelist { get; }
Property Value
BlockAbilityActivation
If true, the player will not be able to use abilities while this effect is active. Default to IsActiveEffect.
public virtual bool BlockAbilityActivation { get; }
Property Value
BlockInteractables
If true, the player will not be able to use interactables while this effect is active. Default to BlockAbilityActivation.
public virtual bool BlockInteractables { get; }
Property Value
DefaultDuration
The default duration of the effect, in seconds. Do not override if the effect is permanent, or you plan to set the duration when calling AddEffect.
public virtual float DefaultDuration { get; }
Property Value
DisableMovementInput
If true, movement inputs will be ignored for this player.
public virtual bool DisableMovementInput { get; }
Property Value
FreezePlayer
If true, the player will be frozen while this effect is active.
public virtual bool FreezePlayer { get; }
Property Value
GetInterruptedByNewActiveEffects
If true, this effect will be removed with interrupt when a new active effect is added. Useful for UI effects like opening up a map where you want to be able to do it even if you currently have an Active effect, but want to be taken out of it if somebody attacks you while its open for example.
public virtual bool GetInterruptedByNewActiveEffects { get; }
Property Value
Invisibility
If true, the player will be invisible while this effect is active.
public virtual bool Invisibility { get; }
Property Value
IsActiveEffect
Only one active effect may be on a player at a time. If true, this effect will cancel the existing active effect when added to a player.
public abstract bool IsActiveEffect { get; }
Property Value
IsValidTarget
If true, the player will be a valid target for other player abilities while this effect is active.
public virtual bool IsValidTarget { get; }
Property Value
NameInvisibility
If true, the player's will be invisible while this effect is active.
public virtual bool NameInvisibility { get; }
Property Value
Methods
AEffectNetworkDeserialize(StreamReader)
public void AEffectNetworkDeserialize(StreamReader reader)
Parameters
reader
StreamReader
AEffectNetworkSerialize(StreamWriter)
public void AEffectNetworkSerialize(StreamWriter writer)
Parameters
writer
StreamWriter
LateUpdate()
Called every frame the entity is enabled, after all Update methods have been called.
public override sealed void LateUpdate()
NetworkDeserialize(StreamReader)
Called on a new player when they drop in. Receives the data written by NetworkSerialize.
public virtual void NetworkDeserialize(StreamReader reader)
Parameters
reader
StreamReader
NetworkSerialize(StreamWriter)
Called on the server when a new player drops in. Serialize any data you want the client to receive.
public virtual void NetworkSerialize(StreamWriter writer)
Parameters
writer
StreamWriter
OnAnimationEvent(string)
Animation events from the player will be forwarded to this method.
public virtual void OnAnimationEvent(string eventName)
Parameters
eventName
string
OnEffectEnd(bool)
Called when the effect's duration ends, or when it is removed from the player.
public virtual void OnEffectEnd(bool interrupt)
Parameters
interrupt
boolTrue if the effect was removed before its duration ended.
Remarks
Interrupt being true is often a signal that something different needs to happen in the end. For example, perhaps you have an effect to open a chest that the player can loot. If interrupt is true you probably would not want to grant the loot to the player.
OnEffectLateUpdate()
Called once per frame while the effect is alive.
public virtual void OnEffectLateUpdate()
OnEffectStart(bool)
Called when the effect is added to a player. When a new player joins an already-running game, all existing effects are automatically created for all players and OnEffectStart() is called with isDropIn == true.
public virtual void OnEffectStart(bool isDropIn)
Parameters
isDropIn
bool
OnEffectUpdate()
Called once per frame while the effect is alive.
public virtual void OnEffectUpdate()
Update()
Called every frame the entity is enabled.
public override sealed void Update()