[lua]bullet_holder = {};
function createNewBullet()
local bullet = display.newImage(“bullet.png”);
table.insert(bullet_holder,bullet);
World:insert(bullet);
print(bullet_holder[1].x);
print(bullet_holder[1].y);
end
function scene:createScene(event)
group = self.view;
World = display.newGroup();
group:insert(World);
end[/lua]
Just create a new display group (For example: World). From there you can add anything to the group: world, and it’ll be added into scene’s group.
[lua]function exampleInitMenu()
example_logo = display.newImage(“example_logo.png”);
World:insert(example_logo);
end
function scene:createScene(event)
group = self.view;
World = display.newGroup();
group:insert(World);
end
function scene:enterScene(event)
exampleInitMenu();
end[/lua]
What’s cool is you can still add things to World and it’ll be in effect even AFTER the execution of this line:
[lua]group:insert(World);[/lua] [import]uid: 49300 topic_id: 25973 reply_id: 105133[/import]