Class AbilitySpawnEventData
Event data for spawning abilities, containing all relevant information for ability instantiation and tracking.
public class AbilitySpawnEventData : EventData
- Inheritance
-
AbilitySpawnEventData
- Inherited Members
Constructors
AbilitySpawnEventData(ICharacter, Ability, Transform, TargetInfo, int, AbilityObject, RefWrapper<int>, Dictionary<int, AbilityObject>)
Initializes a new instance of the AbilitySpawnEventData class.
public AbilitySpawnEventData(ICharacter initiator, Ability ability, Transform abilitySpawner, TargetInfo targetInfo, int seed, AbilityObject initialAbilityObject, RefWrapper<int> currentAbilityObjectID, Dictionary<int, AbilityObject> spawnedAbilityObjects)
Parameters
initiatorICharacterThe character initiating the ability spawn.
abilityAbilityThe ability being spawned.
abilitySpawnerTransformThe transform acting as the spawner for the ability.
targetInfoTargetInfoInformation about the target of the ability.
seedintThe random seed for deterministic spawning.
initialAbilityObjectAbilityObjectThe initial ability object created (if any).
currentAbilityObjectIDRefWrapper<int>A reference wrapper for the current ability object ID.
spawnedAbilityObjectsDictionary<int, AbilityObject>A dictionary to store all spawned ability objects.
Properties
Ability
The ability being spawned.
public Ability Ability { get; }
Property Value
AbilitySpawner
The transform that acts as the spawner for the ability (e.g., the caster's hand, a spawn point).
public Transform AbilitySpawner { get; }
Property Value
- Transform
CurrentAbilityObjectID
A reference wrapper for the current ability object ID (used for tracking spawned objects).
public RefWrapper<int> CurrentAbilityObjectID { get; }
Property Value
InitialAbilityObject
The initial ability object created (if any).
public AbilityObject InitialAbilityObject { get; }
Property Value
Seed
The random seed used for deterministic ability spawning.
public int Seed { get; }
Property Value
SpawnedAbilityObjects
A dictionary to store all spawned ability objects, keyed by their unique ID.
public Dictionary<int, AbilityObject> SpawnedAbilityObjects { get; }
Property Value
TargetInfo
Information about the target of the ability (position, entity, etc.).
public TargetInfo TargetInfo { get; }