ZepetoInputControl
39 min
type description playeractions /#playeractions responsible for handling player specific actions like movement, jumping, and double jumping cameraactions /#cameraactions manages camera related input actions within the zepeto world uiactions /#uiactions handles various ui related input actions iplayeractions /#iplayeractions interface for player actions icameraactions /#icameraactions interface for camera actions iuiactions /#iuiactions interface for ui actions playeractions class responsible for handling player specific actions like movement, jumping, and double jumping properties name type description move inputaction retrieves the input action for player movement jump inputaction retrieves the input action for player jump doublejump inputaction retrieves the input action for player double jump enabled boolean indicates the current activation status of the player's input actions methods get get() → inputactionmap retrieves inputactionmap associated with player actions returns inputactionmap — inputactionmap for player actions enable enable() → void activates the player action map, enabling player input actions disable disable() → void deactivates the player action map, disabling player input actions setcallbacks setcallbacks(instance iplayeractions) → void associates callback methods from instance with the respective player actions parameter type description instance iplayeractions /#iplayeractions an object that implements the iplayeractions interface cameraactions class manages camera related input actions within the zepeto world properties name type description scroll inputaction returns the input action for scrolling the camera primarytouchposition inputaction returns the input action for capturing the position of the primary touch primarytouchcontact inputaction returns the input action for detecting contact on the primary touch secondarytouchposition inputaction returns the input action for capturing the position of the secondary touch secondarytouchcontact inputaction returns the input action for detecting contact on the secondary touch tertiarytouchposition inputaction returns the input action for capturing the position of the tertiary touch tertiarytouchcontact inputaction returns the input action for detecting contact on the tertiary touch enabled boolean indicates whether the input actions within the camera action map are currently enabled methods get get() → inputactionmap retrieves the inputactionmap associated with camera actions from the zepetoinputcontrol returns inputactionmap — returns an inputactionmap object, a collection of camera related input actions enable enable() → void enables all the input actions within the camera action map disable disable() → void disables all the input actions within the camera action map setcallbacks setcallbacks(instance icameraactions) → void sets the callback interface for the camera actions, allowing external implementation of action handlers parameter type description instance icameraactions /#icameraactions object implements the icameraactions interface uiactions class handles various ui related input actions properties name type description navigate inputaction this action handles navigation through ui elements, such as menus or lists, typically using directional inputs like arrow keys, joystick movement, or swipe gestures submit inputaction represents the action of confirming or selecting a highlighted ui element, equivalent to a 'enter' or 'ok' command cancel inputaction this action corresponds to a cancellation or 'back' command, allowing users to return to a previous menu or close a current ui window point inputaction handles the pointing mechanism in ui, similar to moving a mouse cursor or a finger touch point on touchscreens click inputaction represents the action of clicking a ui element, akin to mouse clicks or screen taps scrollwheel inputaction this action is used to capture scrolling input, such as from a mouse wheel or a touchpad gesture middleclick inputaction represents the action of pressing the middle mouse button rightclick inputaction corresponds to the action of right clicking with a mouse, often used to open context menus or perform secondary actions trackeddeviceposition inputaction captures the positional data of a tracked device, like a vr controller or a motion tracking device trackeddeviceorientation inputaction tracks the orientation of a device, typically used in vr or ar setups to detect the direction in which a device is pointed or facing enabled boolean indicates whether the ui actions are currently active and responsive to input methods get get() → inputactionmap returns the inputactionmap associated with ui actions returns inputactionmap — the returned inputactionmap includes all the input actions defined for ui interactions within the zepetoinputcontrol class enable enable() → void activates the ui input actions, making them responsive to user input disable disable() → void deactivates the ui input actions, rendering them unresponsive to user input setcallbacks setcallbacks(instance iuiactions) → void registers callback methods for the ui actions it links the actions to their respective event handlers as defined in the iuiactions interface implemented by the instance parameter type description instance iuiactions /#iuiactions an object that implements the iuiactions interface iplayeractions interface interface for player actions methods onmove onmove(context callbackcontext) → void on move parameter type description context callbackcontext callback context onjump onjump(context callbackcontext) → void on jump parameter type description context callbackcontext callback context ondoublejump ondoublejump(context callbackcontext) → void on double jump parameter type description context callbackcontext callback context icameraactions interface interface for camera actions methods onscroll onscroll(context callbackcontext) → void on scroll parameter type description context callbackcontext callback context onprimarytouchposition onprimarytouchposition(context callbackcontext) → void on primary touch position parameter type description context callbackcontext callback context onprimarytouchcontact onprimarytouchcontact(context callbackcontext) → void on primary touch contact parameter type description context callbackcontext callback context onsecondarytouchposition onsecondarytouchposition(context callbackcontext) → void on scroll parameter type description context callbackcontext callback context onsecondarytouchcontact onsecondarytouchcontact(context callbackcontext) → void on secondary touch contact parameter type description context callbackcontext callback context ontertiarytouchposition ontertiarytouchposition(context callbackcontext) → void on tertiary touch position parameter type description context callbackcontext callback context ontertiarytouchcontact ontertiarytouchcontact(context callbackcontext) → void on tertiary touch contact parameter type description context callbackcontext callback context iuiactions interface interface for ui actions methods onnavigate onnavigate(context callbackcontext) → void on navigate parameter type description context callbackcontext callback context onsubmit onsubmit(context callbackcontext) → void on submit parameter type description context callbackcontext callback context oncancel oncancel(context callbackcontext) → void on cancel parameter type description context callbackcontext callback context onpoint onpoint(context callbackcontext) → void on point parameter type description context callbackcontext callback context onclick onclick(context callbackcontext) → void on click parameter type description context callbackcontext callback context onscrollwheel onscrollwheel(context callbackcontext) → void on scroll wheel parameter type description context callbackcontext callback context onmiddleclick onmiddleclick(context callbackcontext) → void on middle click parameter type description context callbackcontext callback context onrightclick onrightclick(context callbackcontext) → void on right click parameter type description context callbackcontext callback context ontrackeddeviceposition ontrackeddeviceposition(context callbackcontext) → void on tracked device position parameter type description context callbackcontext callback context ontrackeddeviceorientation ontrackeddeviceorientation(context callbackcontext) → void on tracked device orientation parameter type description context callbackcontext callback context
