From 4d2d55b4fcd22a8a66be1ece5c2d1faad867a788 Mon Sep 17 00:00:00 2001 From: Aki Date: Wed, 20 Sep 2017 16:56:51 +0200 Subject: Removed obsolete create methods --- not/Sprite.lua | 1 + not/World.lua | 15 --------------- 2 files changed, 1 insertion(+), 15 deletions(-) (limited to 'not') diff --git a/not/Sprite.lua b/not/Sprite.lua index 33b8ac8..ec23eac 100644 --- a/not/Sprite.lua +++ b/not/Sprite.lua @@ -11,6 +11,7 @@ Sprite.frame = 1 Sprite.delay = .1 -- Constructor of `Sprite`. +-- TODO: Sprites' in general don't take actual Image in constructor. That is not only case of Decoration. function Sprite:new (imagePath) if type(imagePath) == "string" then self:setImage(Sprite.newImage(imagePath)) diff --git a/not/World.lua b/not/World.lua index 4e5b52f..730f696 100644 --- a/not/World.lua +++ b/not/World.lua @@ -205,13 +205,6 @@ function World:addLayer (width, height) end -- TODO: Standardize `create*` methods with corresponding constructors. Pay attention to both params' order and names. -function World:createPlatform (x, y, polygon, sprite, animations) - local p = Platform(animations, polygon, x, y, self, sprite) - table.insert(self.entities, p) - p.layer = self.layers.platforms - return p -end - function World:createNaut (x, y, name) local h = Player(name, x, y, self) table.insert(self.entities, h) @@ -219,14 +212,6 @@ function World:createNaut (x, y, name) return h end --- TODO: Sprites' in general don't take actual Image in constructor. That is not only case of Decoration. -function World:createDecoration (x, y, sprite) - local d = Decoration(x, y, self, sprite) - table.insert(self.entities, d) - d.layer = self.layers.decorations - return d -end - function World:createEffect (name, x, y) local e = Effect(name, x, y, self) table.insert(self.entities, e) -- cgit v1.1