I’m wondering whether I need to remove temporary display objects I show on screen as scores.
I’m using this code:
[lua] local msg = display.newText( “+” … addScore, 0, 0, nil, 12 )
msg:setTextColor( 255, 255, 136, 255 )
local msggroup = display.newGroup()
msggroup:insert( msg, true )
msggroup:translate( enemyList[enemyID].x, enemyList[enemyID].y )
transition.to(msg, {time=3000, alpha=0})[/lua]
Should I remove these objects even though they’ve been turned invisible? I’m reposting these temporary score numbers every few seconds.
If they should be removed, what would be the appropriate way?
[lua]transition.to(msg, {time=3000, alpha=0, onComplete=remove:self()}[/lua]
Thanks. [import]uid: 1560 topic_id: 2123 reply_id: 302123[/import]
