【修行预览、神将信息】
parent
a22a984c61
commit
1e2a932096
|
@ -8,10 +8,6 @@ local bgName
|
||||||
local Live
|
local Live
|
||||||
local orginLayer = 0
|
local orginLayer = 0
|
||||||
|
|
||||||
local specialList = {
|
|
||||||
[10034] = Vector2.New(0,950),
|
|
||||||
}
|
|
||||||
|
|
||||||
--初始化组件(用于子类重写)
|
--初始化组件(用于子类重写)
|
||||||
function BattleBossInfoPanel:InitComponent()
|
function BattleBossInfoPanel:InitComponent()
|
||||||
self.spLoader = SpriteLoader.New()
|
self.spLoader = SpriteLoader.New()
|
||||||
|
@ -147,13 +143,7 @@ function BattleBossInfoPanel:OnShow()
|
||||||
poolManager:UnLoadLive(bgName, Live)
|
poolManager:UnLoadLive(bgName, Live)
|
||||||
Live = nil
|
Live = nil
|
||||||
end
|
end
|
||||||
for key, value in pairs(specialList) do
|
Live = poolManager:LoadLive(bgName, self.liveroot.transform, Vector3.one, Vector2.New(pos[1],pos[2]))
|
||||||
if key == data.BossPreview then
|
|
||||||
Live = poolManager:LoadLive(bgName, self.liveroot.transform, Vector3.one, value)
|
|
||||||
break
|
|
||||||
end
|
|
||||||
Live = poolManager:LoadLive(bgName, self.liveroot.transform, Vector3.one, Vector2.New(pos[1],pos[2]))
|
|
||||||
end
|
|
||||||
self.root.transform.localScale = Vector3.one*scale
|
self.root.transform.localScale = Vector3.one*scale
|
||||||
|
|
||||||
--Bottom
|
--Bottom
|
||||||
|
|
|
@ -5,6 +5,7 @@ local parent
|
||||||
--传入特效层级
|
--传入特效层级
|
||||||
local sortingOrder=0
|
local sortingOrder=0
|
||||||
local data
|
local data
|
||||||
|
local XiuXianConfig = ConfigManager.GetConfig(ConfigName.XiuXianConfig)
|
||||||
|
|
||||||
function PracticeStatePreview:InitComponent(gameObject)
|
function PracticeStatePreview:InitComponent(gameObject)
|
||||||
self.titleText = Util.GetGameObject(gameObject,"TitleText"):GetComponent("Text")
|
self.titleText = Util.GetGameObject(gameObject,"TitleText"):GetComponent("Text")
|
||||||
|
@ -83,7 +84,10 @@ function PracticeStatePreview:SetSingleData(index,_go,_data)
|
||||||
singleTextList[i]:SetActive(true)
|
singleTextList[i]:SetActive(true)
|
||||||
Text.text = string
|
Text.text = string
|
||||||
num.text = string2
|
num.text = string2
|
||||||
if _data.IsActive then
|
if _data.IsActive == 2 then
|
||||||
|
Text.text = string.format("<color=#00ff00>%s</color>",string)
|
||||||
|
num.text = string.format("<color=#00ff00>%s</color>",string2)
|
||||||
|
elseif _data.IsActive == 1 and not XiuXianConfig[PracticeManager.PracticeLevel].LevelUpCost then
|
||||||
Text.text = string.format("<color=#00ff00>%s</color>",string)
|
Text.text = string.format("<color=#00ff00>%s</color>",string)
|
||||||
num.text = string.format("<color=#00ff00>%s</color>",string2)
|
num.text = string.format("<color=#00ff00>%s</color>",string2)
|
||||||
end
|
end
|
||||||
|
@ -91,7 +95,7 @@ function PracticeStatePreview:SetSingleData(index,_go,_data)
|
||||||
if _data.RealmDesc then
|
if _data.RealmDesc then
|
||||||
specialText.gameObject:SetActive(true)
|
specialText.gameObject:SetActive(true)
|
||||||
specialText.text = _data.RealmDesc
|
specialText.text = _data.RealmDesc
|
||||||
if _data.IsActive then
|
if _data.IsActive == 1 or _data.IsActive == 2 then
|
||||||
specialText.text = string.format("<color=#00ff00>%s</color>",_data.RealmDesc)
|
specialText.text = string.format("<color=#00ff00>%s</color>",_data.RealmDesc)
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
|
|
|
@ -148,7 +148,13 @@ function this.GetPreViewData()
|
||||||
if configData.RealmDesc then
|
if configData.RealmDesc then
|
||||||
data.RealmDesc = configData.RealmDesc
|
data.RealmDesc = configData.RealmDesc
|
||||||
end
|
end
|
||||||
data.IsActive = this.PracticeBigLevel >= i
|
if this.PracticeBigLevel > i then
|
||||||
|
data.IsActive = 2--完全激活
|
||||||
|
elseif this.PracticeBigLevel == i then
|
||||||
|
data.IsActive = 1
|
||||||
|
elseif this.PracticeBigLevel < i then
|
||||||
|
data.IsActive = 0
|
||||||
|
end
|
||||||
data.AddList = AddListData[i]
|
data.AddList = AddListData[i]
|
||||||
table.insert(previewList,data)
|
table.insert(previewList,data)
|
||||||
end
|
end
|
||||||
|
@ -338,15 +344,15 @@ function this.PracticeCheckUpgrade()
|
||||||
for i = 1, #configData.LevelUpCost do
|
for i = 1, #configData.LevelUpCost do
|
||||||
local data = configData.LevelUpCost[i]
|
local data = configData.LevelUpCost[i]
|
||||||
if BagManager.GetTotalItemNum(data[1]) < data[2] then
|
if BagManager.GetTotalItemNum(data[1]) < data[2] then
|
||||||
-- LogRed("return false Upgrade 1")
|
LogRed("return false Upgrade 1")
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
-- LogGreen("return true Upgrade")
|
LogGreen("return true Upgrade")
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
-- LogRed("return false Upgrade 2")
|
LogRed("return false Upgrade 2")
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -356,12 +362,12 @@ function this.PracticeCheckImprint()
|
||||||
if this.ImprintServerData[v.Id] then
|
if this.ImprintServerData[v.Id] then
|
||||||
local str = PlayerPrefs.GetInt(PlayerManager.uid.."Imprint"..v.Id)
|
local str = PlayerPrefs.GetInt(PlayerManager.uid.."Imprint"..v.Id)
|
||||||
if str == 0 then
|
if str == 0 then
|
||||||
-- LogGreen("return true Imprint")
|
LogGreen("return true Imprint")
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
-- LogRed("return false Imprint")
|
LogRed("return false Imprint")
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue