Methods
init
perform
performAction with ListenerContext; this overload may be removed.
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
initinit(self: T, context: Context) -> boolean
type MyListenerAction = {}
-- Called once when the script initializes.
function init(self: MyListenerAction, context: Context): boolean
return true
end
function perform(self: MyListenerAction, pointerEvent: PointerEvent) end
return function(): ListenerAction<MyListenerAction>
return {
init = init,
perform = perform,
}
end
performperform(self: T, pointerEvent: PointerEvent) -> ()
performAction with ListenerContext; this overload may be removed.
type MyListenerAction = {}
function init(self: MyListenerAction, context: Context): boolean
return true
end
-- Add your transition logic here.
function perform(self: MyListenerAction, pointerEvent: PointerEvent)
-- perform action here
end
-- Return a factory function that Rive uses to build the Listener Action instance.
return function(): ListenerAction<MyListenerAction>
return {
init = init,
perform = perform,
}
end
performActionperformAction(self: T, listenerContext: ListenerContext) -> ()
type MyListenerAction = {}
function init(self: MyListenerAction, context: Context): boolean
return true
end
-- 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 performAction(self: MyListenerAction, listenerContext: ListenerContext)
return true
end
-- Return a factory function that Rive uses to build the Listener Action instance.
return function(): ListenerAction<MyListenerAction>
return {
init = init,
performAction = performAction,
}
end
Was this page helpful?