summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorAki <nthirtyone@gmail.com>2018-04-07 19:23:14 +0200
committerAki <nthirtyone@gmail.com>2018-04-07 19:23:14 +0200
commit290d75dceb905217cb67fcb32e95dbeb45e27e3c (patch)
treea7cc4725b003c1932ad88f4fce8548d43605bf9b
parent6c487d44312dd96fb37825ea3fc7354f108fdfb6 (diff)
downloadroflnauts-290d75dceb905217cb67fcb32e95dbeb45e27e3c.zip
roflnauts-290d75dceb905217cb67fcb32e95dbeb45e27e3c.tar.gz
roflnauts-290d75dceb905217cb67fcb32e95dbeb45e27e3c.tar.bz2
Renamed setAnimationsList to setAnimations to follow love's naming convention
-rw-r--r--not/CloudGenerator.lua2
-rw-r--r--not/Effect.lua2
-rw-r--r--not/Hero.lua2
-rw-r--r--not/Platform.lua2
-rw-r--r--not/Sprite.lua2
-rw-r--r--not/Trap.lua2
-rw-r--r--not/World.lua2
7 files changed, 7 insertions, 7 deletions
diff --git a/not/CloudGenerator.lua b/not/CloudGenerator.lua
index e72514b..62cac5c 100644
--- a/not/CloudGenerator.lua
+++ b/not/CloudGenerator.lua
@@ -17,7 +17,7 @@ end
-- TODO: This was a bad idea. Move Cloud creation back to World, pass created Cloud here for configuration.
function CloudGenerator:createCloud (x, y, style)
local cloud = Cloud(x, y, self.world, self.atlas)
- cloud:setAnimationsList(self.quads)
+ cloud:setAnimations(self.quads)
cloud:setAnimation(style)
cloud:setVelocity(13, 0)
cloud:setBoundary(340, 320)
diff --git a/not/Effect.lua b/not/Effect.lua
index 6c0dad0..ebbfece 100644
--- a/not/Effect.lua
+++ b/not/Effect.lua
@@ -10,7 +10,7 @@ function Effect:new (name, x, y, world)
end
Effect.__super.new(self, x, y, world, nil)
self.finished = false
- self:setAnimationsList(require("config.animations.effects"))
+ self:setAnimations(require("config.animations.effects"))
self:setAnimation(name)
end
diff --git a/not/Hero.lua b/not/Hero.lua
index 3037837..2b5c529 100644
--- a/not/Hero.lua
+++ b/not/Hero.lua
@@ -49,7 +49,7 @@ function Hero:new (config, x, y, world)
self.punchCooldown = 0
-- TODO: Pass loaded portrait from menu to Hero.
self.portrait = love.graphics.newImage(config.portrait)
- self:setAnimationsList(require("config.animations.hero"))
+ self:setAnimations(require("config.animations.hero"))
-- Post-creation
self:createEffect("respawn")
end
diff --git a/not/Platform.lua b/not/Platform.lua
index a4b3a59..29c74cf 100644
--- a/not/Platform.lua
+++ b/not/Platform.lua
@@ -8,7 +8,7 @@ Platform = PhysicalBody:extends()
-- Constructor of `Platform`
function Platform:new (animations, shape, x, y, world, imagePath)
Platform.__super.new(self, x, y, world, imagePath)
- self:setAnimationsList(animations)
+ self:setAnimations(animations)
-- Create table of shapes if single shape is passed.
if type(shape[1]) == "number" then
shape = {shape}
diff --git a/not/Sprite.lua b/not/Sprite.lua
index 191a7f7..a4bd6b8 100644
--- a/not/Sprite.lua
+++ b/not/Sprite.lua
@@ -48,7 +48,7 @@ function Sprite:getImage ()
end
-- Sets new animations list.
-function Sprite:setAnimationsList (t)
+function Sprite:setAnimations (t)
if t then
self.animations = t
self:setAnimation("default")
diff --git a/not/Trap.lua b/not/Trap.lua
index 0867a36..ec208bc 100644
--- a/not/Trap.lua
+++ b/not/Trap.lua
@@ -2,7 +2,7 @@ Trap = require "not.PhysicalBody":extends()
function Trap:new (direction, x, y, world, imagePath)
Trap.__super.new(self, x, y, world, imagePath)
- self:setAnimationsList(require("config.animations.flames"))
+ self:setAnimations(require("config.animations.flames"))
self:setBodyType("static")
local mirror = 1
diff --git a/not/World.lua b/not/World.lua
index cadb4fd..b01a94e 100644
--- a/not/World.lua
+++ b/not/World.lua
@@ -132,7 +132,7 @@ function World:buildMap ()
x = op.x
y = op.y
elseif op.animations then
- entity:setAnimationsList(getAnimations(op.animations))
+ entity:setAnimations(getAnimations(op.animations))
_,_,x,y = entity:getAnimation()[1]:getViewport()
x, y = x / -2, y / -2
else