Yeah, I looked at my previous backup code and I called the parent function in “did Hide” it would crash on some devices with the parent would be"nil"
-- "scene:hide()" function scene:hide( event ) local sceneGroup = self.view local phase = event.phase local parent = event.parent if ( phase == "will" ) then -- Called when the scene is on screen (but is about to go off screen). -- Insert code here to "pause" the scene. -- Example: stop timers, stop animation, stop audio, etc. elseif ( phase == "did" ) then -- Called immediately after scene goes off screen. parent:stopBloodEmitter( ) composer.removeScene("startgame\_overlay") end end
Would I be SAFE to call the parent function in “WILL HIDE” it seems logical to me that event.parent would not be “nil” because it hasn’t left the screen yet.