-- TODO: these need to come out of a factory Bullet = Tile:extend { image = 'data/laser.png', onNew = function(self) self.velocity = vector.new(1000, 0) self.velocity:rotate_inplace(self.rotation) self.createdAt = love.timer.getTime() the.bullets:add(self) end, onUpdate = function(self, dt) if love.timer.getTime() - self.createdAt > 0.7 then -- TODO: reuse these (see factory idea above) the.bullets:remove(self) self:die() end end }