summaryrefslogtreecommitdiffhomepage
path: root/world.lua
diff options
context:
space:
mode:
Diffstat (limited to 'world.lua')
-rw-r--r--world.lua12
1 files changed, 12 insertions, 0 deletions
diff --git a/world.lua b/world.lua
index 81d69bc..db0526c 100644
--- a/world.lua
+++ b/world.lua
@@ -65,6 +65,18 @@ function World:new(map, ...)
return o
end
+-- The end of the world
+function World:delete()
+ self.world:destroy()
+ for _,platform in pairs(self.Platforms) do
+ platform:delete()
+ end
+ for _,naut in pairs(self.Nauts) do
+ naut:delete()
+ end
+ self = nil
+end
+
-- Load map from file
function World:loadMap(name)
local name = name or "default"