diff options
author | Aki <nthirtyone@gmail.com> | 2017-09-20 16:56:51 +0200 |
---|---|---|
committer | Aki <nthirtyone@gmail.com> | 2017-09-20 16:56:51 +0200 |
commit | 4d2d55b4fcd22a8a66be1ece5c2d1faad867a788 (patch) | |
tree | 5dacdb41a21f41da399db69723ce299d9c09f850 | |
parent | 69d3ae7be97b177dacb06cec4873b7a27ccb70cb (diff) | |
download | roflnauts-4d2d55b4fcd22a8a66be1ece5c2d1faad867a788.zip roflnauts-4d2d55b4fcd22a8a66be1ece5c2d1faad867a788.tar.gz roflnauts-4d2d55b4fcd22a8a66be1ece5c2d1faad867a788.tar.bz2 |
Removed obsolete create methods
-rw-r--r-- | not/Sprite.lua | 1 | ||||
-rw-r--r-- | not/World.lua | 15 |
2 files changed, 1 insertions, 15 deletions
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) |