副本红点修改
parent
10156d63e6
commit
0d40e26a34
|
@ -225,12 +225,11 @@ function CarbonTypePanelV2:OnShow(...)
|
|||
if not redPointTypeList then
|
||||
redPointTypeList= {}
|
||||
end
|
||||
for k,v in pairs(carbons) do
|
||||
if redPointTypeList[Util.GetGameObject(v, "redPoint")] then
|
||||
ClearRedPointObject(redPointTypeList[Util.GetGameObject(v, "redPoint")],Util.GetGameObject(v, "redPoint"))
|
||||
redPointTypeList[Util.GetGameObject(v, "redPoint")] = -1
|
||||
end
|
||||
for k,v in pairs(redPointTypeList) do
|
||||
ClearRedPointObject(v,k)
|
||||
v = -1
|
||||
end
|
||||
|
||||
for k,v in ipairs(carbons) do
|
||||
local data
|
||||
if not type[PlayerManager.carbonType][k] then
|
||||
|
@ -238,11 +237,12 @@ function CarbonTypePanelV2:OnShow(...)
|
|||
else
|
||||
data = type[PlayerManager.carbonType][k]
|
||||
end
|
||||
local redpoint = Util.GetGameObject(v, "redPoint")
|
||||
if data.redPointType == -1 or not data.redPointType then
|
||||
Util.GetGameObject(v, "redPoint"):SetActive(false)
|
||||
redpoint:SetActive(false)
|
||||
else
|
||||
BindRedPointObject(data.redPointType,Util.GetGameObject(v, "redPoint"))
|
||||
redPointTypeList[Util.GetGameObject(v, "redPoint")] = data.redPointType
|
||||
BindRedPointObject(data.redPointType,redpoint)
|
||||
redPointTypeList[redpoint] = data.redPointType
|
||||
CheckRedPointStatus(data.redPointType)
|
||||
end
|
||||
end
|
||||
|
@ -503,8 +503,12 @@ function CarbonTypePanelV2:OnClose()
|
|||
this.refreshTimer = nil
|
||||
end
|
||||
this.isPlayDoorAudio = false
|
||||
carbonType = 0
|
||||
carbonType = 0
|
||||
|
||||
for k,v in pairs(redPointTypeList) do
|
||||
ClearRedPointObject(v,k)
|
||||
v = -1
|
||||
end
|
||||
end
|
||||
|
||||
--界面销毁时调用(用于子类重写)
|
||||
|
@ -524,19 +528,19 @@ function CarbonTypePanelV2:OnDestroy()
|
|||
|
||||
ClearRedPointObject(RedPointType.Setting, this.headRedpot)
|
||||
|
||||
for k,v in ipairs(carbons) do
|
||||
local data
|
||||
if not type[PlayerManager.carbonType][k] then
|
||||
data = type[PlayerManager.carbonType].default
|
||||
else
|
||||
data = type[PlayerManager.carbonType][k]
|
||||
end
|
||||
if data.redPointType == -1 or not data.redPointType then
|
||||
else
|
||||
ClearRedPointObject(data.redPointType,Util.GetGameObject(v, "redPoint"))
|
||||
redPointTypeList[Util.GetGameObject(v, "redPoint")] = -1
|
||||
end
|
||||
end
|
||||
-- for k,v in ipairs(carbons) do
|
||||
-- local data
|
||||
-- if not type[PlayerManager.carbonType][k] then
|
||||
-- data = type[PlayerManager.carbonType].default
|
||||
-- else
|
||||
-- data = type[PlayerManager.carbonType][k]
|
||||
-- end
|
||||
-- if data.redPointType == -1 or not data.redPointType then
|
||||
-- else
|
||||
-- ClearRedPointObject(data.redPointType,Util.GetGameObject(v, "redPoint"))
|
||||
-- redPointTypeList[Util.GetGameObject(v, "redPoint")] = -1
|
||||
-- end
|
||||
-- end
|
||||
redPointTypeList = {}
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue