local LD = require("design.LevelDesignLibrary")
local player, thisLevel, son, F1distanceToPlayer
local Fight1Spawned = false
local fight1Pos
local Fight1numEnemies = 2
local F2distanceToPlayer
local Fight2Spawned = false
local fight2Pos
local Fight2numEnemies = 2
local F3distanceToPlayer
local Fight3Spawned = false
local fight3Pos
local Fight3numEnemies = 2
local F4distanceToPlayer
local Fight4Spawned = false
local fight4Pos
local Fight4numEnemies = 2
local F5distanceToPlayer
local Fight5Spawned = false
local fight5Pos
local Fight5numEnemies = 2
function OnUpdate(level)
end
function OnStartGameFromThisLevel(level)
end
function OnUseWorld(level)
end
function SpawnEnemies(fightPos, numEnemies, radius, spawnMove)
  print("spawning", fightPos)
  for i = 1, numEnemies do
    local spawnPos = game.NavMesh.ClosestLocation(fightPos + engine.Vector.New(1, 0, 1))
    spawnPos = spawnPos:FindConnectedLocationInRadius(radius)
    local spawnDir = fightPos - spawnPos
    local newCreature = game.AI.Spawn(thisLevel, spawnPos, spawnDir, "CRT_Bandit00", spawnMove)
    print(i)
  end
end
