summaryrefslogtreecommitdiffhomepage
path: root/not/World.lua
diff options
context:
space:
mode:
authorAki <nthirtyone@gmail.com>2017-05-26 22:44:00 +0200
committerAki <nthirtyone@gmail.com>2017-05-26 22:44:00 +0200
commitb14d4608dc921f882067c43c71fcf04db7b2f794 (patch)
tree04c00f9dde638f0a1689f601f780975fdd158b24 /not/World.lua
parent81e72006a4ca0578f0bbc31d0788a6e0223fdb63 (diff)
downloadroflnauts-b14d4608dc921f882067c43c71fcf04db7b2f794.zip
roflnauts-b14d4608dc921f882067c43c71fcf04db7b2f794.tar.gz
roflnauts-b14d4608dc921f882067c43c71fcf04db7b2f794.tar.bz2
Rest of entities moved to new oop module; tested
Diffstat (limited to 'not/World.lua')
-rw-r--r--not/World.lua8
1 files changed, 4 insertions, 4 deletions
diff --git a/not/World.lua b/not/World.lua
index 38639b7..88be97a 100644
--- a/not/World.lua
+++ b/not/World.lua
@@ -115,7 +115,7 @@ end
-- Add new platform to the world
-- TODO: it would be nice if function parameters would be same as `not.Platform.new`.
function World:createPlatform (x, y, polygon, sprite, animations)
- table.insert(self.Platforms, Platform(animations, polygon, self, x, y, sprite))
+ table.insert(self.Platforms, Platform(animations, polygon, x, y, self, sprite))
end
-- Add new naut to the world
@@ -129,14 +129,14 @@ end
-- Add new decoration to the world
-- TODO: `not.World.create*` functions often have different naming for parameters. It is not ground-breaking but it makes reading code harder for no good reason.
function World:createDecoration (x, y, sprite)
- table.insert(self.Decorations, Decoration(x, y, sprite))
+ table.insert(self.Decorations, Decoration(x, y, self, sprite))
end
-- Add new cloud to the world
-- TODO: extend variables names to provide better readability.
-- TODO: follow new parameters in `not.Cloud.new` based on `not.Cloud.init`.
function World:createCloud (x, y, t, v)
- table.insert(self.Clouds, Cloud(x, y, t, v))
+ table.insert(self.Clouds, Cloud(x, y, t, v, self))
end
-- Randomize Cloud creation
@@ -163,7 +163,7 @@ end
-- TODO: follow new parameters in `not.Effect.new` based on `not.Effect.init`.
-- TODO: along with `createRay` move this nearer reast of `create*` methods for readability.
function World:createEffect (name, x, y)
- table.insert(self.Effects, Effect(name, x, y))
+ table.insert(self.Effects, Effect(name, x, y, self))
end
-- Add a ray