在下面的代码中,它显示“SCORE:100”或其他任何内容,但是随着分数/分数的变化,总数重叠在另一个之上,您无法阅读它们......我希望在显示新分数之前删除/删除旧分数/points ANY THOUGHTS HOW TO FIX this...这是 LUA 并在我的测试期间使用 CORONA SDK 我已发送打印语句以尝试对部分进行故障排除
--积分正在另一个位置计算 --更新分数
local function updateScore(Points)
if WTF == 1 then
print ("SCORE: -->",Points)
--PointsText:removeSelf(PointsText)
PointsText = display.newText(Points,0,0,native.sytemFont,42)
PointsText.text = Points
PointsText.xscale = 0.5; PointsText.yscale = 0.5
PointsText:setTextColor(155,155,225)
PointsText.x = centerX * 1
PointsText.y = centerY - 150
ScoreTxt = display.newText("Score: ",0,0,native.systemFont,40)
ScoreTxt:setTextColor(220,50,50)
ScoreTxt.x = display.contentCenterX
ScoreTxt.y = display.contentCenterY-100
end
end