小游戏cannon支持鼠标和触屏操作
This commit is contained in:
@@ -33,6 +33,16 @@ function scene.keyDown(key)
|
|||||||
SCN.back()
|
SCN.back()
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
function scene.mouseDown(k)
|
||||||
|
if k==1 then
|
||||||
|
scene.keyDown("space")
|
||||||
|
elseif k==2 then
|
||||||
|
SCN.back()
|
||||||
|
end
|
||||||
|
end
|
||||||
|
function scene.touchDown()
|
||||||
|
scene.keyDown("space")
|
||||||
|
end
|
||||||
|
|
||||||
function scene.update()
|
function scene.update()
|
||||||
timer=timer+1
|
timer=timer+1
|
||||||
|
|||||||
Reference in New Issue
Block a user