YaToolAPI¶
Beta
Tool API
Functions¶
Listen for the Tool's ability activation event.
Any Ability activation on this tool will generate a callback.
You can determine which specific Ability is in the callback parameter
callback
callback funcYaAbility
Current Activated Ability
void YaToolAPI.OnAbilityActivate(YaEntity tool, string abilityName, function callback<YaAbility>)Beta
Listen for the Tool's ability activation event.
Only Ability with the name configured generates this event
Remove Ability Activate Event
void YaToolAPI.RemoveAbilityActivate(YaEntity tool, string abilityName, function callback<YaAbility>)Beta
Remove Ability Activate Event
Ability to execute the end event
Listen for Ability by name to end events
Remove Ability Finish event
void YaToolAPI.RemoveAbilityFinish(YaEntity tool, string abilityName, function callback<YaAbility>)Beta
Remove Ability Finish event
Ability Interruption incident.
void YaToolAPI.OnAbilityInterrupted(YaEntity tool, string abilityName, function callback<YaAbility>)Beta
Ability Interruption incident.
Remove Ability Interrupted
void YaToolAPI.RemoveAbilityInterrupted(YaEntity tool, string abilityName, function callback<YaAbility>)Beta
Remove Ability Interrupted
Actively interrupt the executing Ability in the Tool。
Activate an ability on the Tool
Get the owner of the tool。