【问题标题】:Corona touch event?电晕触摸事件?
【发布时间】:2012-09-14 01:54:25
【问题描述】:

如何将整个显示屏注册为事件监听器?

【问题讨论】:

    标签: lua coronasdk


    【解决方案1】:

    创建 main.lua 并添加它。

    function drawLine( event )
      if(event.phase == "ended") then
        line = display.newLine(event.xStart, event.yStart, event.x, event.y)
        line:setColor(255,0,0)
        line.width = 5
      end
    end
    Runtime:addEventListener("touch", drawLine)
    

    当然要查看这个网站http://developer.anscamobile.com/resources/docs

    【讨论】:

      【解决方案2】:

      将事件监听器添加到运行时

      【讨论】:

        猜你喜欢
        • 2013-03-17
        • 2013-05-04
        • 1970-01-01
        • 2017-01-16
        • 1970-01-01
        • 1970-01-01
        • 2021-06-14
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多