Add weapon to Ebi.

This commit is contained in:
Anna Rose 2023-09-30 16:11:39 -04:00
parent 0db42e8c87
commit c46ee29caa

View File

@ -18,6 +18,8 @@ function Ebi:init()
dir = -1
end
self.vector = {x=0, y=dir}
self:weaponTimer()
end
function Ebi:update()
@ -28,3 +30,14 @@ function Ebi:update()
end
end
end
function Ebi:weaponTimer()
local t = playdate.timer.new(1000,
function()
local b = Bullet(2, 1, {x=-1, y=0}, 0x2)
b:moveTo(self.x - (self.width/2) - 1, self.y)
b:add()
end
)
t.repeats = true
end