So what I wanted for you guys to give me an opinion on is this.
So in one of my games that’s in progress i have a score counter that works like this,
local score = 0 local scoreTxt = display.newText( "0", 0, 0, "NexaRust", 20 ) scoreTxt.x = centerX scoreTxt.y = centerY - actualH/2 + 40 sceneGroup:insert(scoreTxt) local function updateScore(event) score = score + 1 scoreTxt.text = string.format("%d", score ) end
So to work my score i add a timer which makes my score go +1 every frame.
Like this.
local scoreTimer = timer.performWithDelay( 1, updateScore, -1 )
But every frame is just not enough for my game so i added another one like this.
local scoreTimerTwo = timer.performWithDelay( 1, updateScore, -1 )
So now there are TWO timers that update the same score and its twice as fast and its perfect for my game.
So my question is – Is this okay to do?
–SonicX278