AbilityOnDestroyEvent - jimdroberts/FishMMO GitHub Wiki
ScriptableObject event triggered when the ability object is destroyed. Inherits from AbilityEvent
and is used to define custom logic or effects that occur upon the destruction of an ability object in the FishMMO system.
-
(Inherited) Methods from AbilityEvent
All methods from the base
AbilityEvent
class are available. This class does not add new methods or fields.
- Create a new
AbilityOnDestroyEvent
asset via the Unity menu: FishMMO/Abilities/Events/Ability On Destroy Event. - Assign the event asset to an ability or object that should trigger logic on destruction.
- Configure any inherited fields or properties as needed in the Inspector.
- Integrate with the ability system to ensure the event is triggered appropriately.
// Example 1: Using AbilityOnDestroyEvent
// This example demonstrates how to create and assign an AbilityOnDestroyEvent
// to an ability object so that custom logic is triggered when the object is destroyed.
// 1. In Unity, create a new AbilityOnDestroyEvent asset.
// 2. Assign it to the relevant ability or prefab.
// 3. Implement any custom logic in scripts that listen for the event.