-- Remove from all

for i = 1, #Indicator.all do
if self == Indicator.all[i] then
table.remove(Indicator.all, i)
break
end
end
end


function Indicator:setAngle(angleRadians)
if not self.alive then return end
	
local angleDegrees = angleRadians * (180 / math.pi)
self.frame.Position = UDim2.new(
		.5,
		math.cos(angleRadians) * radius + self.frame.AbsoluteSize.X / -2,
		.5,
		math.sin(angleRadians) * radius + self.frame.AbsoluteSize.Y / -2
	)
self.frame.Rotation = angleDegrees + 90
end


function Indicator:update()
if tick() >= self.timeExpire then
self:expire()
else
local perc = (tick() - self.timeCreated) / self.time
self:setAngle(getCameraAngle(camera) - angleBetweenPoints(camera.Focus.p, self.position) - math.pi / 2)

self.frame.ImageLabel.ImageTransparency = perc
self.frame.ImageLabel.Size = UDim2.new(0, 50, 0, -50 * (1 - perc))
end
end


function Indicator:updateAll()
local i = 1
while i <= #Indicator.all do
local indicator = Indicator.all[i]
indicator:update()
if indicator.alive then
i = i + 1
end
end
end
