【修行】结构更改

dev_chengFeng
ZhangBiao 2021-12-06 11:57:08 +08:00
parent 4434f9b615
commit b433178b6e
1 changed files with 17 additions and 16 deletions

View File

@ -16,25 +16,27 @@ function Practice:InitComponent()
end end
self.BtView = SubUIManager.Open(SubUIConfig.BtView, self.transform) self.BtView = SubUIManager.Open(SubUIConfig.BtView, self.transform)
self.UpView = SubUIManager.Open(SubUIConfig.UpView, self.transform) self.UpView = SubUIManager.Open(SubUIConfig.UpView, self.transform)
self.Practice = Util.GetGameObject(self.gameObject, "Prectice")
--Btns --Btns
self.helpBtn = Util.GetGameObject(self.gameObject, "Btns/helpBtn") self.Btns = Util.GetGameObject(self.Practice, "Btns")
self.starBtn = Util.GetGameObject(self.gameObject, "Btns/starBtn") self.helpBtn = Util.GetGameObject(self.Btns, "helpBtn")
self.starBtn = Util.GetGameObject(self.Btns, "starBtn")
self.helpPosition=self.helpBtn:GetComponent("RectTransform").localPosition self.helpPosition=self.helpBtn:GetComponent("RectTransform").localPosition
self.previewBtn = Util.GetGameObject(self.gameObject, "Btns/leftGrid/previewBtn") self.previewBtn = Util.GetGameObject(self.Btns, "leftGrid/previewBtn")
self.additionBtn = Util.GetGameObject(self.gameObject, "Btns/leftGrid/additionBtn") self.additionBtn = Util.GetGameObject(self.Btns, "leftGrid/additionBtn")
self.cultivationBtn = Util.GetGameObject(self.gameObject, "Btns/leftGrid/cultivationBtn") self.cultivationBtn = Util.GetGameObject(self.Btns, "leftGrid/cultivationBtn")
self.cultivationRed = Util.GetGameObject(self.cultivationBtn, "redPoint") self.cultivationRed = Util.GetGameObject(self.cultivationBtn, "redPoint")
self.imprintBtn = Util.GetGameObject(self.gameObject, "Btns/rightGrid/imprintBtn") self.imprintBtn = Util.GetGameObject(self.Btns, "rightGrid/imprintBtn")
self.imprintRedPoint = Util.GetGameObject(self.imprintBtn, "redPoint") self.imprintRedPoint = Util.GetGameObject(self.imprintBtn, "redPoint")
self.fourQuadrantBtn = Util.GetGameObject(self.gameObject, "Btns/rightGrid/yushenBtn") self.fourQuadrantBtn = Util.GetGameObject(self.Btns, "rightGrid/yushenBtn")
self.fourQuadrantRedPoint = Util.GetGameObject(self.fourQuadrantBtn, "redPoint") self.fourQuadrantRedPoint = Util.GetGameObject(self.fourQuadrantBtn, "redPoint")
self.starNum = Util.GetGameObject(self.starBtn, "starNum"):GetComponent("Text") self.starNum = Util.GetGameObject(self.starBtn, "starNum"):GetComponent("Text")
self.treeBtn = Util.GetGameObject(self.gameObject, "Btns/rightGrid/treeBtn") self.treeBtn = Util.GetGameObject(self.Btns, "rightGrid/treeBtn")
self.treeRed = Util.GetGameObject(self.treeBtn, "redPoint") self.treeRed = Util.GetGameObject(self.treeBtn, "redPoint")
self.talsmanSoulBtn = Util.GetGameObject(self.gameObject, "Btns/rightGrid/talsmanSoulBtm") self.talsmanSoulBtn = Util.GetGameObject(self.Btns, "rightGrid/talsmanSoulBtm")
self.talsmanSoulBtnRed = Util.GetGameObject(self.talsmanSoulBtn, "redPoint") self.talsmanSoulBtnRed = Util.GetGameObject(self.talsmanSoulBtn, "redPoint")
self.incarnationBtn = Util.GetGameObject(self.gameObject, "Btns/leftGrid/incarnationBtn") self.incarnationBtn = Util.GetGameObject(self.Btns, "leftGrid/incarnationBtn")
self.incarnationBtnRed = Util.GetGameObject(self.incarnationBtn, "redPoint") self.incarnationBtnRed = Util.GetGameObject(self.incarnationBtn, "redPoint")
--MidPart --MidPart
@ -43,7 +45,7 @@ function Practice:InitComponent()
self.img = Util.GetGameObject(self.mid, "Man"):GetComponent("Image") self.img = Util.GetGameObject(self.mid, "Man"):GetComponent("Image")
self.ManCanvas = Util.GetGameObject(self.mid, "Man"):GetComponent("Canvas") self.ManCanvas = Util.GetGameObject(self.mid, "Man"):GetComponent("Canvas")
--BottomPart --BottomPart
self.bottom = Util.GetGameObject(self.gameObject, "Bottom") self.bottom = Util.GetGameObject(self.Practice, "Bottom")
self.items = Util.GetGameObject(self.bottom, "Items") self.items = Util.GetGameObject(self.bottom, "Items")
self.PointPre = Util.GetGameObject(self.items, "PointPre") self.PointPre = Util.GetGameObject(self.items, "PointPre")
self.lines = Util.GetGameObject(self.bottom, "Lines") self.lines = Util.GetGameObject(self.bottom, "Lines")
@ -74,11 +76,11 @@ function Practice:InitComponent()
self.effectPointsList = {} self.effectPointsList = {}
self.mask = Util.GetGameObject(self.gameObject, "mask") self.mask = Util.GetGameObject(self.gameObject, "mask")
self.skillObj=Util.GetGameObject(self.gameObject, "SkillObj") self.skillObj=Util.GetGameObject(self.Practice, "SkillObj")
self.skillList={} self.skillList={}
for i = 1, 4 do for i = 1, 4 do
table.insert(self.skillList,Util.GetGameObject(self.gameObject, "SkillObj/skill"..i)) table.insert(self.skillList,Util.GetGameObject(self.Practice, "SkillObj/skill"..i))
BindRedPointObject(5000+i*100,Util.GetGameObject(self.gameObject, "SkillObj/skill"..i.."/red")) BindRedPointObject(5000+i*100,Util.GetGameObject(self.Practice, "SkillObj/skill"..i.."/red"))
end end
end end
@ -472,8 +474,7 @@ function Practice:OnDestroy()
ClearRedPointObject(RedPointType.tailsmanSoul,self.talsmanSoulBtnRed) ClearRedPointObject(RedPointType.tailsmanSoul,self.talsmanSoulBtnRed)
ClearRedPointObject(RedPointType.incarnation,self.incarnationBtnRed) ClearRedPointObject(RedPointType.incarnation,self.incarnationBtnRed)
for i = 1, 4 do for i = 1, 4 do
-- table.insert(self.skillList,Util.GetGameObject(self.gameObject, "SkillObj/skill"..i)) ClearRedPointObject(500+i*100,Util.GetGameObject(self.Practice, "SkillObj/skill"..i.."/red"))
ClearRedPointObject(500+i*100,Util.GetGameObject(self.gameObject, "SkillObj/skill"..i.."/red"))
end end
self.itemList = {} self.itemList = {}
self.skillList={} self.skillList={}