core/assets: add a way to deactivate sprite animation
This commit is contained in:
parent
1cc8acd4c3
commit
d30f28322a
1 changed files with 5 additions and 1 deletions
|
@ -42,6 +42,8 @@ function Assets:new()
|
||||||
self:clearTileset()
|
self:clearTileset()
|
||||||
|
|
||||||
self.images = {}
|
self.images = {}
|
||||||
|
|
||||||
|
self.isActive = true
|
||||||
end
|
end
|
||||||
|
|
||||||
function Assets:init()
|
function Assets:init()
|
||||||
|
@ -68,7 +70,9 @@ function Assets:clear()
|
||||||
end
|
end
|
||||||
|
|
||||||
function Assets:update(dt)
|
function Assets:update(dt)
|
||||||
self:animationsUpdate(dt)
|
if (self.isActive) then
|
||||||
|
self:animationsUpdate(dt)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
-- SFX et Musique
|
-- SFX et Musique
|
||||||
|
|
Loading…
Reference in a new issue