The ObjectEffects module makes it possible to drag & drop any amount of effect behaviours onto your objects, which listen and react to Effect Events. Effect Event Triggers fire events of a certain type, to which effects then behave as you define them.
It's a highly flexible system, allowing you to quickly create visual and auditive feedback based on what happens in your game.
The module doesn't provide many triggers or effects by itself, but once you start adding other modules, it quickly grows as it connects to almost all of them. This binds them all together and ensures you can play out your playful feedback the way you want it.
ObjectEffects has a dependency on UtilityCollection and DynamicVariables.
It provides an optional extension for Entities, InputControl, MultiTransform, ObjectPooling, ScreenControl, ScreenEffects, SoundControl and TapticEffects.
NOTE: This is up to date, but work in progress! Will be improved when time permits.
Add triggers to objects. For example, an EffectTriggerEntity fires events based on entity appearing and disappearing.
Add effect behaviours to the same objects. For example, an EffectSize.
Set the default size to 0, create an AccelerationSettings value somewhere in your project and reference it for speed.
Add a Reaction, with event type IsVisible, and set target value to 1.
You just created an object which grows and shrinks as it appears and disappears. The event IsVisible acts more like a 'State' than an event, with a range being set between 0 and 1 depending on the Entity's visibility.
You can add another effect, EffectWavePosition, and set the Reaction event to Appearing. This event acts just like an event, triggering the 'wobble' of the objects position when it appears, but not when it disappears.
For UI screens that slide in and out, see EffectOffset.
Every Effect has Settings. You can edit the Settings directly on the behaviour, or reference a Effect Asset, which you can create somewhere in your project folder hierarchy.
Using Setting assets allows you to have multiple objects use the exact same set of Reactions and default settings.
You can add an EffectController to a GameObject. You can reference a List of Effect Assets. When the game starts, all effects listed are automatically added to the behaviour, using the settings within the assets.
You can also create an Effect Style, which is an asset with a list of effects. This way, you can create effect styles which are automatically applied to the object as long as there is an EffectController referencing them.
If you want child objects to listen to the events of a parent object, add the EventObject to the parent object. All EffectBehaviours search for an EventObject in their parents, and listen for events of it instead of itself. It's optional, however, and if none is found, effect behaviours use their own object.
Don't forget to add using DuskModules.ObjectEffects; to any script using the module.