Fixed small bug
This commit is contained in:
parent
093f67ecfa
commit
acd14a510b
|
@ -1,5 +1,5 @@
|
|||
|
||||
--local error = require 'errors' 'SpriteSheet2'
|
||||
local error = require 'errors' 'SpriteSheet2'
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
-- Util
|
||||
|
@ -76,6 +76,8 @@ function Animation.new (self)
|
|||
assert(#self > 0)
|
||||
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)
|
||||
self.duration = calculate_animation_duration(self)
|
||||
self.is_animation = true
|
||||
|
|
Loading…
Reference in New Issue
Block a user