1
0

Fixed small bug

This commit is contained in:
Jon Michael Aanes 2018-11-10 15:03:21 +01:00
parent 093f67ecfa
commit acd14a510b

View File

@ -1,5 +1,5 @@
--local error = require 'errors' 'SpriteSheet2' local error = require 'errors' 'SpriteSheet2'
-------------------------------------------------------------------------------- --------------------------------------------------------------------------------
-- Util -- Util
@ -76,6 +76,8 @@ function Animation.new (self)
assert(#self > 0) assert(#self > 0)
assert(type(self.time) == 'number' or #self == #self.time) assert(type(self.time) == 'number' or #self == #self.time)
assert(self.wrap == nil or self.wrap == true or self.wrap == false)
local self = setmetatable(self, Animation) local self = setmetatable(self, Animation)
self.duration = calculate_animation_duration(self) self.duration = calculate_animation_duration(self)
self.is_animation = true self.is_animation = true