0
我打印了显示“是”的文本。我必须按箭头的形状。我试图弄明白,如果我点击左边的箭头说“不”,如果我点击右边的箭头说“是”。love2d - 更新打印文本的文本
fsdefault = "Yes"
fs = love.graphics.print(fsdefault, 440, 160)
love.graphics.draw(larrow, 425, 163)
love.graphics.draw(rarrow, 470, 163)
function love.update(dt)
function love.mousepressed(x, y)
if x > 424 and x < 435 and y > 161 and y < 172 then
fsdefault = "No"
end
if x > 275 and x < 320 and y > 305 and y < 325 then
fsdefault = "Yes"
end
end
end
'x> 424和x <335'。选择一个'x'。它会满足这两个条件吗? – hjpotter92
对不起。它的意思是435.原始文章已被编辑 – Ross