Simple questions:
In the Intro to the Composer API tutorial, and also in the documentation, the author mentions custom functions that are tied to the “scene” object.
local composer = require( "composer" ) local scene = composer.newScene() ... -- Custom function for resuming the game (from pause state) function scene:resumeGame() --code to resume game end
Would it be safe to set up ALL custom functions for a scene as above?
Say the above example is in “scene 1.” Would Composer properly unload the function when “scene 1” is unloaded, or would it persist across all scenes?
It is unclear whether the scene object is unique to each scene, or if it persists across all scenes.