noble animations
This commit is contained in:
28
source/scripts/bigBoomSprite.lua
Normal file
28
source/scripts/bigBoomSprite.lua
Normal file
@@ -0,0 +1,28 @@
|
||||
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
|
||||
Reference in New Issue
Block a user