Class TriggerConfig
Represents a configuration of AbilityTrigger. A trigger can have multiple configurations to give the ability "button" multiple functions depending on context.
Only manaCost, maxCharges, cooldownTime and minimumDelay are safely editable during runtime on server.
Inheritance
object
TriggerConfig
Assembly: Dew.Core.dll
Syntax
[Serializable]
public class TriggerConfig
Fields
Declaration
[BoxGroup("A", false, false, 0)]
[ToggleLeft]
[HideIf("@!isActive", true)]
public bool alwaysCastImmediately
Field Value
appliedStatusEffectRef
Declaration
[HideIf("isActive", true)]
public StatusEffect appliedStatusEffectRef
Field Value
canConsumeCastBonus
Declaration
[BoxGroup("A", false, false, 0)]
[ToggleLeft]
[HideIf("@!isActive", true)]
public bool canConsumeCastBonus
Field Value
canReceiveCooldownReduction
Declaration
[BoxGroup("A", false, false, 0)]
[ToggleLeft]
[LabelText("Can Receive Cooldown Reduction")]
public bool canReceiveCooldownReduction
Field Value
castByMoveDirectionByDefault
Declaration
[BoxGroup("A", false, false, 0)]
[ToggleLeft]
[HideIf("@!isActive", true)]
public bool castByMoveDirectionByDefault
Field Value
castByMoveDirectionGamepad
Declaration
[BoxGroup("A", false, false, 0)]
[ToggleLeft]
[HideIf("@!isActive", true)]
public bool castByMoveDirectionGamepad
Field Value
castMethod
You must call AbilityTrigger.SyncCastMethodChanges after modifying this on server.
Declaration
[ShowIf("isActive", true)]
[HideLabel]
[BoxGroup("B", false, false, 0)]
public CastMethodData castMethod
Field Value
castVoice
Declaration
[ShowIf("isActive", true)]
public DewAudioClip castVoice
Field Value
channel
Declaration
[HideLabel]
[ShowIf("isActive", true)]
public TriggerChannelData channel
Field Value
destroyExistingEffect
Declaration
[ShowIf("@(spawnedInstance is StatusEffect)", true)]
public bool destroyExistingEffect
Field Value
effectOnCast
Declaration
[ShowIf("isActive", true)]
[LabelText("Channel Effect")]
public GameObject effectOnCast
Field Value
| Type |
Description |
| UnityEngine.GameObject |
|
endAnim
Declaration
[ShowIf("isActive", true)]
public DewAnimationClip endAnim
Field Value
faceForward
Declaration
[BoxGroup("A", false, false, 0)]
[ToggleLeft]
[LabelText("Face Forward When Cast")]
[HideIf("@castMethod.type == CastMethodType.None || !isActive", true)]
public bool faceForward
Field Value
ignoreAbilityLock
Declaration
[BoxGroup("A", false, false, 0)]
[ToggleLeft]
[HideIf("@!isActive", true)]
public bool ignoreAbilityLock
Field Value
ignoreAimDirectionGamepad
Declaration
[BoxGroup("A", false, false, 0)]
[ToggleLeft]
[HideIf("@!isActive", true)]
public bool ignoreAimDirectionGamepad
Field Value
ignoreBlock
Declaration
[BoxGroup("A", false, false, 0)]
[ToggleLeft]
[LabelText("Ignore Channel Block")]
[HideIf("@!isActive", true)]
public bool ignoreBlock
Field Value
isActive
Declaration
[VerticalGroup("HorizontalC/VerticalA", 0)]
public bool isActive
Field Value
lockCastUntilKilled
Declaration
[ToggleLeft]
public bool lockCastUntilKilled
Field Value
lockCooldownUntilKilled
Declaration
[ToggleLeft]
public bool lockCooldownUntilKilled
Field Value
moveTowardsCastDirection
Declaration
[BoxGroup("A", false, false, 0)]
[ToggleLeft]
[ShowIf("isActive", true)]
public bool moveTowardsCastDirection
Field Value
overrideRotation
Declaration
[BoxGroup("A", false, false, 0)]
[ToggleLeft]
[ShowIf("@isActive && faceForward", true)]
public bool overrideRotation
Field Value
overrideRotationDuration
Declaration
[BoxGroup("A", false, false, 0)]
[LabelText("Duration")]
[ShowIf("@overrideRotation && isActive", true)]
public float overrideRotationDuration
Field Value
postDelay
Declaration
[ShowIf("isActive", true)]
public float postDelay
Field Value
postponeBasicCommand
Declaration
[BoxGroup("A", false, false, 0)]
[ToggleLeft]
[LabelText("Continue Basic Command Afterwards")]
[ShowIf("isActive", true)]
public bool postponeBasicCommand
Field Value
predictionSettings
Declaration
[ShowIf("isActive", true)]
public AbilityTrigger.PredictionSettings predictionSettings
Field Value
selfValidator
Declaration
[HideLabel]
[BoxGroup("A", false, false, 0)]
[ShowIf("isActive", true)]
public AbilitySelfValidator selfValidator
Field Value
setFillAmount
Declaration
[ShowIf("IsStatusEffectNonTargeted", true)]
public bool setFillAmount
Field Value
spawnedInstanceRef
Declaration
[InfoBox("StatusEffect will be applied to the caster.", "IsStatusEffectNonTargeted")]
[ShowIf("isActive", true)]
public AssetRef<AbilityInstance> spawnedInstanceRef
Field Value
startAnim
Declaration
[FormerlySerializedAs("animation")]
[ShowIf("isActive", true)]
public DewAnimationClip startAnim
Field Value
startCharges
Declaration
[HorizontalGroup("HorizontalB", 0, 0, 0, 0)]
[LabelText("Start")]
[LabelWidth(55)]
[SerializeField]
[JsonProperty]
public int startCharges
Field Value
targetValidator
Declaration
[ShowIf("isActive", true)]
[HideLabel]
public AbilityTargetValidator targetValidator
Field Value
triggerIcon
Declaration
[PreviewField(ObjectFieldAlignment.Left, Height = 40)]
[HideLabel]
[HorizontalGroup("HorizontalC", 40, 0, 0, 0)]
public Sprite triggerIcon
Field Value
| Type |
Description |
| UnityEngine.Sprite |
|
unstoppableWhileCasting
Declaration
[BoxGroup("A", false, false, 0)]
[ToggleLeft]
[HideIf("@!isActive", true)]
public bool unstoppableWhileCasting
Field Value
victim
Declaration
[ShowIf("@(spawnedInstance is StatusEffect) && (castMethod.type == CastMethodType.Target)", true)]
public TriggerConfig.StatusEffectVictimType victim
Field Value
Properties
addedCharges
Declaration
public int addedCharges { get; set; }
Property Value
appliedStatusEffect
Declaration
public StatusEffect appliedStatusEffect { get; set; }
Property Value
cooldownTime
Declaration
public float cooldownTime { get; set; }
Property Value
effectiveRange
Declaration
public float effectiveRange { get; }
Property Value
manaCost
Declaration
public float manaCost { get; set; }
Property Value
maxCharges
Declaration
public int maxCharges { get; set; }
Property Value
minimumDelay
Declaration
public float minimumDelay { get; set; }
Property Value
spawnedInstance
Declaration
public AbilityInstance spawnedInstance { get; set; }
Property Value
Methods
CheckRange(CastInfo)
Returns true if provided info can be casted immediately.
Returns false if provided info needs further movement to get in range.
You may call this regardless of cast method type,
But note that CastMethodType.Point will always return true if isClamping is true.
Declaration
public bool CheckRange(CastInfo info)
Parameters
Returns
Exceptions
| Type |
Condition |
| System.ArgumentOutOfRangeException |
|
CheckRange(Entity, Entity)
Declaration
public bool CheckRange(Entity caster, Entity target)
Parameters
Returns
GetMoveToCastDestination(CastInfo)
Get move-to-cast destination.
Declaration
public Vector3 GetMoveToCastDestination(CastInfo info)
Parameters
Returns
| Type |
Description |
| UnityEngine.Vector3 |
|
Exceptions
| Type |
Condition |
| System.ArgumentOutOfRangeException |
|
GetMoveToCastRequiredDistance(CastInfo)
Get move-to-cast required distance on XZ plane (agent position).
Declaration
public float GetMoveToCastRequiredDistance(CastInfo info)
Parameters
Returns
Exceptions
| Type |
Condition |
| System.ArgumentOutOfRangeException |
|
IsStatusEffectNonTargeted()
Declaration
public bool IsStatusEffectNonTargeted()
Returns