I’ve been wanting to use the director class to control which map or level is loaded in my game.
http://developer.anscamobile.com/code/director-class-10
With the director class, you add objects to a group which gets deleted from memory when you transition out of a scene. I’ve been able to get maps to load using the director class:
function new()
local localGroup = display.newGroup()
– Load Lime
local lime = require(“lime”)
– Load your map
local map = lime.loadMap(“maps/tutorial0.tmx”)
– Create the visual
local visual = lime.createVisual(map)
localGroup:insert(visual)
return localGroup
end
Question:
I know that the “visual” object will be removed from memory when localGroup is deleted. What happens to “map” and “lime” should I be worried about this? Anyone have any tips on integrating lime with the director class. My understanding of corona memory management is a bit weak.
Thanks,
m
[import]uid: 12267 topic_id: 6106 reply_id: 306106[/import]