Skip to main content

EffectVolumeTrigger

A class in Root.Township, Alta.Alchemy.

VolumeTrigger that applies a list of effect definitions to effect handlers that enter it and reverses them when they leave. Server only; disabled on clients.

Constructors​

MemberWhat it is
EffectVolumeTrigger()Unity makes components itself; use AddComponent or spawn a prefab instead of new.

Fields​

2 private and internal fields
MemberWhat it is
private EffectVolumeTrigger.Effect[] effectsThe effect definitions and strengths to apply, set in the inspector.
private bool isServerCached NetworkSceneManager.IsServer from Awake.

Properties​

MemberWhat it is
override bool IsCheckingForEffectHandler { get; }True on the server, so the base trigger tracks effect handlers there only.
override bool IsCheckingForRigidbody { get; }True on the server, so the base trigger tracks rigidbodies there only.

Methods​

MemberWhat it is
protected override void EffectHandlerEntered(EffectHandler handler)Applies every listed effect at its strength and adds the handler to ActiveEffectTargets.
protected override void EffectHandlerLeft(EffectHandler handler)Applies every listed effect at negative strength and removes the handler from ActiveEffectTargets.
1 private and internal method
MemberWhat it is
private void Awake()Caches whether this is the server and disables the component if not.