-- Public Functions

function ParticleController.SetupParticlesPlayer(player)
	local character = player.Character or player.CharacterAdded:wait()
	
	-- Create all relevant particles TODO: Use a for loop for this instead?
	local _upgradeParticle = upgradeParticle:Clone()
	local _upgradeCheckpoint = upgradeCheckpoint:Clone()
	
	_upgradeParticle.Parent = character:WaitForChild(particleHolderName)
	_upgradeCheckpoint.Parent = character:WaitForChild(particleHolderName)
end

function ParticleController.EmitCheckpointParticle(player)
	-- Get the particle on the player and make it emit
	local character = player.Character
	local particleHolder = character:WaitForChild(particleHolderName)
	local particleEffect = particleHolder:WaitForChild("ParticleCheckpoint")
	particleEffect:Emit(particleEmitRate)
end

function ParticleController:CreateUpgradeParticle(player)
	local character = player.Character or player.CharacterAdded:wait()
	local particleEffect = upgradeCheckpoint:Clone()
	particleEffect.Parent = character:WaitForChild(particleHolderName)
	particleEffect:Emit(particleEmitRate)
end


return ParticleController
