@peach pellen
How would that code apply to replacing hud in the game?
[lua]
local hud = function()
eggText = display.newText( "Caught: " … eggCount, 0, 0, “Arial”, 45 )
eggText:setTextColor( 255, 255, 255, 255 )
eggText.xScale = 0.5; eggText.yScale = 0.5
eggText.x = (480 - (eggText.contentWidth * 0.5)) - 15
eggText.y = 305
gameGroup:insert( eggText )
livesText = display.newText( "Lives: " … gameLives, 0, 0, “Arial”, 45 )
livesText:setTextColor( 255, 255, 255, 255 ) --> white
livesText.xScale = 0.5; livesText.yScale = 0.5
livesText.x = (480 - (livesText.contentWidth * 0.5)) - 15
livesText.y = 15
gameGroup:insert( livesText )
scoreText = display.newText( "Score: " … gameScore, 0, 0, “Arial”, 45 )
scoreText:setTextColor( 255, 255, 255, 255 ) --> white
scoreText.xScale = 0.5; scoreText.yScale = 0.5
scoreText.x = (scoreText.contentWidth * 0.5) + 15
scoreText.y = 15
gameGroup:insert( scoreText )
local onPauseTouch = function( event )
if event.phase == “release” and pauseBtn.isActive then
audio.play( buttonSound )[/lua] [import]uid: 128294 topic_id: 28718 reply_id: 119558[/import]
[import]uid: 52491 topic_id: 28718 reply_id: 119626[/import]