我正在尝试制作一个简单的 corona sdk 游戏,但无法正常工作。我想制作一个分数文本字段,但我有很多问题。
功能:
function points(num)
addPoints()
score = score + num
scoreTxt.text = "hoi"
scoreTxt:setReferencePoint(display.TopLeftReferencePoint)
end
function addPoints()
num = math.random(100, 350)
end
其他一些信息:
score = 50;
num = 50;
scoreTxt = display.newText ("Score:", 0, 0, "Helvetica", 20)
scoreTxt:setReferencePoint(display.TopLeftReferencePoint)
scoreTxt.x = display.screenOriginX + 10
scoreTxt.y = display.screenOriginX + 5
提前致谢 :)