Called when the associated State Machine Listener is triggered.
This method includes a PointerEvent parameter containing details about the triggering interaction.
Copy
Ask AI
type MyListenerAction = {}function init(self: MyListenerAction, context: Context): boolean return trueend-- Add your transition logic here.-- `evaluate` is fired every frame while the transition is active.-- Returning false prevents a transition, true allows a transition.function perform(self: MyListenerAction, pointerEvent: PointerEvent) return trueend-- Return a factory function that Rive uses to build the Listener Action instance.return function(): ListenerAction<MyListenerAction> return { init = init, perform = perform, }end