local LD = require("design.LevelDesignLibrary")
local Draugr340_1_Emitter, Draugr340_3_Emitter, Draugr_TemporalDoor_1_Emitter, Draugr345_1_Emitter, Draugr325_1_Emitter
function OnFirstStart(level)
  GameObjects.Draugr340_1.Child:SetCharacterConfig("light1")
  GameObjects.Draugr340_1.Child:StartAnim("tauntRoar")
  GameObjects.Draugr340_1.Child:JumpAnimToFrame(0)
  GameObjects.Draugr340_1.Child:PlayAnimCycle(0.7)
  GameObjects.Draugr340_2.Child:SetCharacterConfig("light1")
  GameObjects.Draugr340_2.Child:StartAnim("navIdle01")
  GameObjects.Draugr340_2.Child:JumpAnimToFrame(10)
  GameObjects.Draugr340_2.Child:PlayAnimCycle(1)
  GameObjects.Draugr340_3.Child:SetCharacterConfig("light1")
  GameObjects.Draugr340_3.Child:StartAnim("tauntRoar")
  GameObjects.Draugr340_3.Child:JumpAnimToFrame(30)
  GameObjects.Draugr340_3.Child:PlayAnimCycle(0.6)
  GameObjects.Draugr340_4.Child:SetCharacterConfig("light1")
  GameObjects.Draugr340_4.Child:StartAnim("navIdle01")
  GameObjects.Draugr340_4.Child:JumpAnimToFrame(40)
  GameObjects.Draugr340_4.Child:PlayAnimCycle(1.2)
  GameObjects.Draugr_TemporalDoor_1.Child:SetCharacterConfig("light1")
  GameObjects.Draugr_TemporalDoor_1.Child:StartAnim("tauntRoar")
  GameObjects.Draugr_TemporalDoor_1.Child:JumpAnimToFrame(0)
  GameObjects.Draugr_TemporalDoor_1.Child:PlayAnimCycle(0.7)
  GameObjects.Draugr_TemporalDoor_2.Child:SetCharacterConfig("light1")
  GameObjects.Draugr_TemporalDoor_2.Child:StartAnim("navIdle01")
  GameObjects.Draugr_TemporalDoor_2.Child:JumpAnimToFrame(20)
  GameObjects.Draugr_TemporalDoor_2.Child:PlayAnimCycle(1.2)
  GameObjects.Draugr_TemporalDoor_3.Child:SetCharacterConfig("light1")
  GameObjects.Draugr_TemporalDoor_3.Child:StartAnim("navIdle01")
  GameObjects.Draugr_TemporalDoor_3.Child:JumpAnimToFrame(0)
  GameObjects.Draugr_TemporalDoor_3.Child:PlayAnimCycle(0.9)
  GameObjects.Draugr345_1.Child:SetCharacterConfig("light1")
  GameObjects.Draugr345_1.Child:StartAnim("tauntRoar")
  GameObjects.Draugr345_1.Child:JumpAnimToFrame(0)
  GameObjects.Draugr345_1.Child:PlayAnimCycle(0.7)
  GameObjects.Draugr345_2.Child:SetCharacterConfig("light1")
  GameObjects.Draugr345_2.Child:StartAnim("navIdle01")
  GameObjects.Draugr345_2.Child:JumpAnimToFrame(0)
  GameObjects.Draugr345_2.Child:PlayAnimCycle()
  GameObjects.Draugr325_1.Child:SetCharacterConfig("light1")
  GameObjects.Draugr325_1.Child:StartAnim("tauntRoar")
  GameObjects.Draugr325_1.Child:JumpAnimToFrame(0)
  GameObjects.Draugr325_1.Child:PlayAnimCycle(0.7)
  GameObjects.Draugr325_2.Child:SetCharacterConfig("light1")
  GameObjects.Draugr325_2.Child:StartAnim("navIdle01")
  GameObjects.Draugr325_2.Child:JumpAnimToFrame(0)
  GameObjects.Draugr325_2.Child:PlayAnimCycle()
end
function OnStart(level)
  Draugr340_1_Emitter = GameObjects.Draugr340_1.Child:FindSingleSoundEmitterByName("SNDMouth")
  Draugr340_3_Emitter = GameObjects.Draugr340_3.Child:FindSingleSoundEmitterByName("SNDMouth")
  Draugr_TemporalDoor_1_Emitter = GameObjects.Draugr_TemporalDoor_1.Child:FindSingleSoundEmitterByName("SNDMouth")
  Draugr345_1_Emitter = GameObjects.Draugr345_1.Child:FindSingleSoundEmitterByName("SNDMouth")
  Draugr325_1_Emitter = GameObjects.Draugr325_1.Child:FindSingleSoundEmitterByName("SNDMouth")
  LD.PlaySound(GameObjects.Draugr340_2.Child:FindSingleSoundEmitterByName("SNDMouth"), "SND_CHR_Draugr_VO_In_Cage_Idle_LP")
  LD.PlaySound(GameObjects.Draugr340_4.Child:FindSingleSoundEmitterByName("SNDMouth"), "SND_CHR_Draugr_VO_In_Cage_Idle_LP")
  LD.PlaySound(GameObjects.Draugr_TemporalDoor_2.Child:FindSingleSoundEmitterByName("SNDMouth"), "SND_CHR_Draugr_VO_In_Cage_Idle_LP")
  LD.PlaySound(GameObjects.Draugr_TemporalDoor_3.Child:FindSingleSoundEmitterByName("SNDMouth"), "SND_CHR_Draugr_VO_In_Cage_Idle_LP")
  LD.PlaySound(GameObjects.Draugr345_2.Child:FindSingleSoundEmitterByName("SNDMouth"), "SND_CHR_Draugr_VO_In_Cage_Idle_LP")
  LD.PlaySound(GameObjects.Draugr325_2.Child:FindSingleSoundEmitterByName("SNDMouth"), "SND_CHR_Draugr_VO_In_Cage_Idle_LP")
end
function OnUpdate(level)
  if GameObjects.Draugr340_1.Child.AnimFrame == 3 then
    LD.PlaySound(Draugr340_1_Emitter, "SND_CHR_Draugr_VO_In_Cage_Taunt_Roar_Long")
  elseif GameObjects.Draugr340_1.Child.AnimFrame == 45 then
    LD.PlaySound(Draugr340_1_Emitter, "SND_CHR_Draugr_VO_In_Cage_Taunt_Roar_Short")
  end
  if GameObjects.Draugr340_3.Child.AnimFrame == 3 then
    LD.PlaySound(Draugr340_3_Emitter, "SND_CHR_Draugr_VO_In_Cage_Taunt_Roar_Long")
  elseif GameObjects.Draugr340_3.Child.AnimFrame == 45 then
    LD.PlaySound(Draugr340_3_Emitter, "SND_CHR_Draugr_VO_In_Cage_Taunt_Roar_Short")
  end
  if GameObjects.Draugr_TemporalDoor_1.Child.AnimFrame == 3 then
    LD.PlaySound(Draugr_TemporalDoor_1_Emitter, "SND_CHR_Draugr_VO_In_Cage_Taunt_Roar_Long")
  elseif GameObjects.Draugr_TemporalDoor_1.Child.AnimFrame == 45 then
    LD.PlaySound(Draugr_TemporalDoor_1_Emitter, "SND_CHR_Draugr_VO_In_Cage_Taunt_Roar_Short")
  end
  if GameObjects.Draugr345_1.Child.AnimFrame == 3 then
    LD.PlaySound(Draugr345_1_Emitter, "SND_CHR_Draugr_VO_In_Cage_Taunt_Roar_Long")
  elseif GameObjects.Draugr345_1.Child.AnimFrame == 45 then
    LD.PlaySound(Draugr345_1_Emitter, "SND_CHR_Draugr_VO_In_Cage_Taunt_Roar_Short")
  end
  if GameObjects.Draugr325_1.Child.AnimFrame == 3 then
    LD.PlaySound(Draugr325_1_Emitter, "SND_CHR_Draugr_VO_In_Cage_Taunt_Roar_Long")
  elseif GameObjects.Draugr325_1.Child.AnimFrame == 45 then
    LD.PlaySound(Draugr325_1_Emitter, "SND_CHR_Draugr_VO_In_Cage_Taunt_Roar_Short")
  end
end
function HidePrisoner()
  GameObjects.Draugr340_3.Child:PauseAnim()
  GameObjects.Draugr340_3.Child:Hide()
end
