Bobber Trigger

A StateMachineBehaviour that triggers bobber spawn or retreat events at specific animation times. Works with any component implementing IBobberSpawner.

Requires:

  • At least one IBobberSpawner on the Animator’s parent or children (e.g., FishingCaster).


🔧 Inspector Settings

Effect Type Determines which event this behaviour controls:

  • Spawn: Triggers OnBobberSpawn() at a set animation time.

  • Retreat: Triggers OnBobberRetreat() at a set animation time.

Spawn Time (visible only if Effect Type = Spawn) Normalized animation time (0.0–1.0) when the bobber should appear.

Retreat Time (visible only if Effect Type = Retreat) Normalized animation time (0.0–1.0) when the bobber should disappear.


📈 Key Behavior

Activation

  • On state enter: Notifies all IBobberSpawner instances that a bobber animation has started.

  • During update: Compares current normalized animation time against the configured trigger time.

  • On state exit: Notifies spawners that the animation ended—but only if exiting to a different state (skips self-transitions).


💡 Notes

  • Designed to be attached to specific animation states (e.g., “Fishing Rod Cast” and “Fishing End”).

  • BobberController implements IBobberSpawner

Last updated