From b14d4608dc921f882067c43c71fcf04db7b2f794 Mon Sep 17 00:00:00 2001 From: Aki Date: Fri, 26 May 2017 22:44:00 +0200 Subject: Rest of entities moved to new oop module; tested --- not/World.lua | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'not/World.lua') 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 -- cgit v1.1