fpv/source/scripts/bomber/boom.lua
2025-04-12 13:32:36 +02:00

29 lines
629 B
Lua

SmallBoom = {}
class("SmallBoom").extends(AnimatedSprite)
local smallBoomImageTable = Graphics.imagetable.new("assets/sprites/smallboom")
function SmallBoom:init()
SmallBoom.super.init(self, smallBoomImageTable)
-- Animation properties
self:addState("play", 1, 3, { tickStep = 1, loop = 2 })
self:setDefaultState("play")
self:playAnimation()
self:setCenter(0, 0)
self:setSize(playdate.display.getSize())
self:setZIndex(ZIndex.flash)
self:moveTo(0, 0)
self:add()
end
function SmallBoom:update()
self:updateAnimation()
end
function SmallBoom:stopAnimation()
self:remove()
end