mirror of
https://gitea.com/SweetSea-ButImNotSweet/tromi_mobile.git
synced 2025-01-08 17:33:09 +08:00
Add scene type notation
This commit is contained in:
16
scene.lua
16
scene.lua
@@ -6,6 +6,22 @@ function SCENE:new() end
|
||||
function SCENE:update() end
|
||||
function SCENE:render() end
|
||||
|
||||
-- You can use the class SCENE_onInput to show suggestions for `e` table
|
||||
|
||||
---@class SCENE_onInput
|
||||
---@field type "key"|"joystick"|"virtual"|"touch"|"mouse"|"wheel"
|
||||
---
|
||||
---@field input? string # Action triggered<br>Only visible via keyboard and gamepad
|
||||
---@field key? love.KeyConstant Only visible via keyboard and gamepad
|
||||
---@field scancode? love.Scancode Only visible via keyboard and gamepad
|
||||
---
|
||||
---@field x? number Only visible via touch and mouse
|
||||
---@field y? number Only visible via touch and mouse
|
||||
---@field dx? number # Delta X<br> Only visible via touch, mouse and wheel
|
||||
---@field dy? number # Delta Y<br> Only visible via touch, mouse and wheel
|
||||
---@field id? lightuserdata # Only visible via touch
|
||||
---@field presses? number # Only visible via mouse
|
||||
|
||||
-- e in 4 below functions will contain different things based on it's type:
|
||||
-- key - input, key, scancode
|
||||
-- joystick - input, button, name
|
||||
|
||||
Reference in New Issue
Block a user