local LD = require("design.LevelDesignLibrary")
local thisObj
local axeEmbeddedInGears = false
local traversePath, PathEval
function OnScriptLoaded(level, obj)
  thisObj = obj
  traversePath = GameObjects.TraverseLink1WheelPuzzle
  PathEval = EvalShow
end
function OnUpdate()
  if thisObj.AnimFrame ~= nil then
    PathEval()
  end
end
function EvalShow()
  if CheckWindow() then
    traversePath:ShowTraverseLink()
    PathEval = EvalHide
  end
end
function EvalHide()
  if not CheckWindow() then
    traversePath:HideTraverseLink()
    PathEval = EvalShow
  end
end
function CheckWindow()
  local frame = thisObj.AnimFrame
  return 320 <= frame and frame <= 460 or 770 <= frame and frame <= 900
end
function AxeIsEmbeded()
  thisObj:PauseAnim()
  if thisObj.AnimFrame >= 0 and thisObj.AnimFrame <= 40 or thisObj.AnimFrame >= 380 and thisObj.AnimFrame <= 500 or thisObj.AnimFrame >= 830 and thisObj.AnimFrame <= 900 then
    traversePath:ShowTraverseLink()
  end
end
function AxeIsNotEmbeded()
  traversePath:HideTraverseLink()
  thisObj:PlayAnimCycle(2.5)
end
