【发布时间】:2019-03-19 21:23:41
【问题描述】:
我正在使用 LOVE2D 来适应更多的 lua,我正在尝试调用一个函数以使一个圆圈出现在屏幕上,有 5 个参数,并且我有一个称为“按钮”的表,其中包含所需的其中的论据。我想使用 table.concat 来填写所有空白参数,但它不会让我。有没有办法做到这一点?
function toRGB(r,g,b)
return r/255,g/255,b/255
end
function love.load()
button = {}
button.mode = "fill"
button.x = 0
button.y = 0
button.size = 30
end
function love.draw()
love.graphics.setColor(toRGB(60,60,60))
love.graphics.circle(table.concat(button))
end
【问题讨论】: