Abilities Global
From Virtual World Web Wiki
Global access to the abilities system for creating and triggering client abilities
- This is a JavaScript global object named Abilities
Remarks [edit]
Events
- OnAbilitiesReset()
- Event fired when the AbilityManager is reset/first initialized
- OnAbilityAdded(EventHandler<FlexibleEventArgs<JSAbility>>)
- Event fired when a new Ability is added
- OnAbilityChanged(EventHandler<FlexibleEventArgs<JSAbility>>)
- Event fired when a new Ability is added
- OnAbilityGroupAdded(EventHandler<FlexibleEventArgs<JSAbilityGroup>>)
- Event fired when a new AbilityGroup is added
- OnAbilityGroupRemoved(EventHandler<FlexibleEventArgs<JSAbilityGroup>>)
- Event fired when an AbilityGroup is removed
- OnAbilityRemoved(EventHandler<FlexibleEventArgs<JSAbility>>)
- Event fired when an Ability is removed
Methods
- JSAbilityGroup AddGroup(string name)
- Create a new root group in the Ability hierarchy
- JSAbilityGroup CreateGroup(string identifier, string name = NULL)
- Guid? DestroyGroup(string identifier)
- JSAbilityGroup FindGroup(string name)
- Gets a root AbilityGroup by display name
- JSAbilityGroup FindGroupByIdentifier(string identifier)
- Gets a root AbilityGroup by string Identifier
- JSAbilityBase GetAbility(Guid abilityID)
- Gets an Ability anywhere in the hierarchy by GUID
- IEnumerable<JSAbilityBase> GetAllAbilities()
- Returns every Ability in the entire Ability hierarchy
- string[] GetEvents()
- JSAbilityGroup GetGroup(string groupid)
- Gets an AbilityGroup anywhere in the hierarchy by GUID
- IEnumerable<JSAbilityGroup> GetGroups()
- Returns all root groups for the Ability hierarchy
- bool RemoveAbility(JSAbility jsAbility)
- Removes the given Javascript-created Ability.
- Throws an exception if the Ability wasn't created by Javascript.
- bool RemoveAbilityByName(string name)
- Removes a Javascript-created Ability by name/identifier.
- Throws an exception if the ability wasn't created by Javascript (or if we got a name collision somehow).
- bool RemoveAbilityGroup(JSAbilityGroup jsAbilityGroup)
- Removes the given Javascript-created AbilityGroup.
- Throws an exception if the AbilityGroup wasn't created by Javascript.