#include "../../script/common/utils.lua"

function init()
	timeMashineSmokeShape = FindShape("time_mashine_smoke")
end

function tick()
	local timeMashineSmokeTransform = GetShapeWorldTransform(timeMashineSmokeShape)
	local timeMashineSmoke = VecAdd(timeMashineSmokeTransform.pos, Vec(0, 0.055, 0))

	ParticleReset()
	ParticleType("smoke")
	ParticleColor(0.73, 0.35, 0.96)
	ParticleRadius(0.2, 0.03, "easeout")
	ParticleCollide(1)
	ParticleGravity(0, 0.3, "smooth")
	ParticleAlpha(0.23, 0, "smooth", "fadeout")
	ParticleRotation(5, 10, "easein")
	ParticleStretch(1.9)
	ParticleTile(3)
	ParticleDrag(0.3)
	ParticleSticky(0.1)

	for i = 1, 4 do
		SpawnParticle(timeMashineSmoke, TransformToParentVec(timeMashineSmokeTransform, Vec(rnd(2, 3), 1, rnd(0.1, 1))), 3)
	end
end