I have what I thought was going to be a simple problem to troubleshoot, but everything I have tried has
failed. I am using corona with the simulator and terminal.
My problem is I have 10 balls on the screen and when those balls are placed in the correct spots then a png file should show its self. The png file is just a “Game Over” sign. The png file will only show its self
the first time but after the player presses the game’s reset button to replay the game. The “Game Over” sign will not show. The only way I can make it show at the end of a game is to press the command R buttons on the key broad.
I need the “Game Over” sign to show it’s self after each game with just a tap on the reset button which seems to work for everything else.
I am using the print(" game over ") code to test my code and the print code works but the png file
Is this a problem with the or what?
My code is below
if ( tonumber(count_txt.text) == total_sphere) then
gameoverpng = display.newImage(“gameover.png”);
gameoverpng.x = _W*.5; gameoverpng.y = _H*.5;
gameoverpng.alpha = 1
bkgd2:insert(gameoverpng)
print(“game over”) --this line prints in the terminal but the png file above doesn’t show.
end
end
thanks for any help [import]uid: 17539 topic_id: 13416 reply_id: 313416[/import]