0
votes

I have a problem in Corona SDK , it does not delete the objects in "level1" then when I move to "level2", then I found that objects in the background of level2

enter image description here

I use this command to move to level2:

.gotoScene ("level2", "slideRight", 250), 

And the at the beginning of level2 I use this command

local storyboard = require( "storyboard" )
local scene = storyboard.newScene()
-- Clear previous scene
storyboard.removeAll()

after that the problem happen.

I just can see that objects when I use the command

physics.setDrawMode ("hybrid")

How can I solve this problem?

1
first of all paste your code. then check twice if your object is inserted into scene group.Lukis
Thank you very much , I tried that but the same problem repeated , what can I do now ?mwsawafta
Thank you The problem has been resolved .mwsawafta
It would be nice to see how you solved it. Because it may also happen to some other person.Lukis

1 Answers

0
votes

I strongly recommend you to update your corona, because storyboard is no longer supported by the sdk, now you have to use "composer" library instead:

https://docs.coronalabs.com/api/library/composer/migration.html

Better now than later when you have to change all your game code.