
function setHasToSpawn(value)
    SetBool("level.medieval_fight.player.spawn", value)
end

function initSpawning()
    dist = 30
    cooldown = {
        value = 2,
        default = 15
    }
end

function updateSpawning(dt)
    cooldown.value = cooldown.value - dt
    if cooldown.value <= 0 then
        cooldown.value = cooldown.default
        setHasToSpawn(true)
    end
end