fpv/source/scripts/bigBoomSprite.lua

29 lines
630 B
Lua
Raw Normal View History

2024-06-02 20:25:27 +03:00
BigBoom = {}
class("BigBoom").extends(AnimatedSprite)
local bigBoomImageTable = Graphics.imagetable.new("assets/sprites/bigboom")
function BigBoom:init()
BigBoom.super.init(self, bigBoomImageTable)
-- Animation properties
self:addState("play", 1, 3, { tickStep = 4, loop = 3 })
self:setDefaultState("play")
self:playAnimation()
self:setCenter(0, 0)
self:setSize(playdate.display.getSize())
self:setZIndex(120)
self:moveTo(0, 0)
self:add()
end
function BigBoom:update()
self:updateAnimation()
end
function BigBoom:stopAnimation()
self:remove()
end