So I have come across two problems and I’ll try to be as thorough as possible when explaining.
1st) So I use the score text from this tutorial
https://docs.coronalabs.com/tutorial/games/keepScores/index.html
and while it does work it doesn’t come with a command to remove the text when reaching the game over state.
local scoreText = score.init( { fontSize = 20, font = "CoolCustomFont.ttf", x = display.contentCenterX, y = 30, maxDigits = 7, leadingZeros = true })
Also how would you remove a rect? Because the rects I do have stay until I restart the corona app.
2nd) My app has this function
local function touchScreen(event) if event.phase == "began" then animation.enterFrame = activateAnimations Runtime:addEventListener("enterFrame", animation) end if event.phase == "ended" then Runtime:removeEventListener("enterFrame", animation) end end
This causes my character to move with every left click, but if I hold left click the character will fly off screen. How would I work around this?
And here’s visual evidence
https://www.youtube.com/watch?v=32eVQ5FqOa0&feature=youtu.be