我正在使用Corona SDK,目前我有这个。当你点击图片时,数字会增加。我很奇怪,一旦达到一定的点击次数,我将如何改变图像?如何根据Corona中的水龙头数量更改图像?
display.setStatusBar(display.HiddenStatusBar)
local newButton = display.newImage ("button.png",0,0)
newButton.x = display.contentWidth - 60
newButton.y = display.contentHeight - 62.5
local number = 0
local textField = display.newText(number, 30, 30, native.systemFont, 25)
local function moveButtonRandom(event)
number = number + 1
textField:removeSelf()
textField = display.newText(number, 30, 30, native.systemFont, 25)
end
newButton:addEventListener("tap", moveButtonRandom)