mirror of
https://gitea.com/SweetSea-ButImNotSweet/tromi_mobile.git
synced 2025-01-08 17:33:09 +08:00
Add `SCENE:onInputMove`
This commit is contained in:
6
main.lua
6
main.lua
@@ -136,6 +136,12 @@ function love.touchpressed(id,x,y)
|
||||
SCENE:onInputPress{type = "touch", x = x, y = y, dx = 0, dy = 0, id = id}
|
||||
end
|
||||
end
|
||||
function love.touchdragged(id,x,y,dx,dy)
|
||||
local x,y=GLOBAL_TRANSFORM:inverseTransformPoint(x,y)
|
||||
if not VCTRL.press(x,y,id) then
|
||||
SCENE:onInputMove{type = "touch", x = x, y = y, dx = dx, dy = dy, id = id}
|
||||
end
|
||||
end
|
||||
function love.touchreleased(id,x,y)
|
||||
local x,y=GLOBAL_TRANSFORM:inverseTransformPoint(x,y)
|
||||
if not VCTRL.release(id) then
|
||||
|
||||
Reference in New Issue
Block a user