タッチ一覧の取得

love.touch.getTouches

追加バージョン0.10.0削除バージョン-

タッチされている箇所の一覧を取得します。

function love.draw()
  local touches = love.touch.getTouches()

  for i, id in ipairs(touches) do
    local x, y = love.touch.getPosition(id)
    love.graphics.print("X: " .. x .. ",Y: " .. y, 20, 20 * (i - 1))
  end
end
タッチ一覧の取得