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