local this = class("mapDungeonNode", require("ui.manager.map.node.mapNode"))
local _typeImg = typeof(C_LImage)
local _typeBtn = typeof(C_LButton)
local _typeTxt = typeof(C_LTextMeshProUGUI)
local _typeRect = typeof(C_RectTransform)
local PATH_MAPNODE = "UI/Pages/Map/BigMap/cellMapDungeonNode.prefab"

function this:ctor(...)
  this.super.ctor(self, ...)
end

function this:generate(parent, pool)
  this.super.generate(self, parent, pool)
end

function this:_generate(parent, pool)
  local go = pool:syncGameObject(PATH_MAPNODE)
  self.go = go
  self.trans = self.go:GetComponent(_typeRect)
  self.imgNode = self.trans:Find("nodeIcon").gameObject:GetComponent(_typeImg)
  self.imgNodeBg = self.trans:Find("nodeIconBg").gameObject:GetComponent(_typeImg)
  self.imgNodeGo = self.trans:Find("nodeIconBg").gameObject
  self.btnNode = self.go:GetComponent(_typeBtn)
  self.choose = self.trans:Find("IsChoose").gameObject
  self.animation = self.go:GetComponent(typeof(C_Animation))
  self.traceEffect = self.go:GetComponent(typeof(C_UIEffectControl))
  self.location = self.trans:Find("nodeIcon/location").gameObject
  self.locationTrans = self.location:GetComponent(typeof(C_RectTransform))
end

function this:refreshLockState()
  local isUnlock = L_SceneStore:getPointIsUnlock(self.id)
  self:setIsUnlock(isUnlock)
end

return this
