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