parent
9941a29937
commit
68f77e83c8
|
|
@ -608,10 +608,19 @@ end
|
||||||
function this.RefreshSoliderInfo()
|
function this.RefreshSoliderInfo()
|
||||||
this.RefreshBossInfo()
|
this.RefreshBossInfo()
|
||||||
this.lvTxt.text=SmallSoldierManager.level
|
this.lvTxt.text=SmallSoldierManager.level
|
||||||
|
LogError("SmallSoldierManager.level===="..SmallSoldierManager.level)
|
||||||
local lotteryConfig=ConfigManager.GetConfigData(ConfigName.SoldiersLotteryConfig,SmallSoldierManager.level)
|
local lotteryConfig=ConfigManager.GetConfigData(ConfigName.SoldiersLotteryConfig,SmallSoldierManager.level)
|
||||||
this.lvBarTxt.text=string.format("兵力:%s/%s",BagManager.GetItemCountById(lotteryConfig.Soldiers[1]),lotteryConfig.Soldiers[2])
|
|
||||||
|
if lotteryConfig.Soldiers[1] and lotteryConfig.Soldiers[2] then
|
||||||
this.btnlvRed:SetActive(BagManager.GetItemCountById(lotteryConfig.Soldiers[1])>lotteryConfig.Soldiers[2])
|
this.btnlvRed:SetActive(BagManager.GetItemCountById(lotteryConfig.Soldiers[1])>lotteryConfig.Soldiers[2])
|
||||||
this.lvBar.fillAmount = BagManager.GetItemCountById(lotteryConfig.Soldiers[1])/lotteryConfig.Soldiers[2]
|
this.lvBar.fillAmount = BagManager.GetItemCountById(lotteryConfig.Soldiers[1])/lotteryConfig.Soldiers[2]
|
||||||
|
this.lvBarTxt.text=string.format("兵力:%s/%s",BagManager.GetItemCountById(lotteryConfig.Soldiers[1]),lotteryConfig.Soldiers[2])
|
||||||
|
else
|
||||||
|
this.btnlvRed:SetActive(false)
|
||||||
|
this.lvBar.fillAmount = 1
|
||||||
|
this.lvBarTxt.text=string.format("兵力:%s/%s",BagManager.GetItemCountById(lotteryConfig.Soldiers[1]),0)
|
||||||
|
end
|
||||||
|
|
||||||
this.btn_change:SetActive(SmallSoldierManager.changeSolider~=nil)
|
this.btn_change:SetActive(SmallSoldierManager.changeSolider~=nil)
|
||||||
if SmallSoldierManager.changeSolider then
|
if SmallSoldierManager.changeSolider then
|
||||||
local changeConfig=ConfigManager.GetConfigData(ConfigName.SoldiersSetting,SmallSoldierManager.changeSolider.id)
|
local changeConfig=ConfigManager.GetConfigData(ConfigName.SoldiersSetting,SmallSoldierManager.changeSolider.id)
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@ local lotteryConfig=ConfigManager.GetConfig(ConfigName.SoldiersLotteryConfig)
|
||||||
local specialConfig=ConfigManager.GetConfigData(ConfigName.SpecialConfig,178).Value
|
local specialConfig=ConfigManager.GetConfigData(ConfigName.SpecialConfig,178).Value
|
||||||
local aaa=string.split(specialConfig,"#")
|
local aaa=string.split(specialConfig,"#")
|
||||||
local list={}
|
local list={}
|
||||||
|
local isMax=false
|
||||||
local activityId=0
|
local activityId=0
|
||||||
local curLv=0
|
local curLv=0
|
||||||
local progress=0
|
local progress=0
|
||||||
|
|
@ -62,6 +62,10 @@ function SmallSoldierLvInfoPanel:BindEvent()
|
||||||
end)
|
end)
|
||||||
|
|
||||||
Util.AddClick(self.btn_go,function()
|
Util.AddClick(self.btn_go,function()
|
||||||
|
if isMax then
|
||||||
|
PopupTipPanel.ShowTip("已提升到最高等级")
|
||||||
|
return
|
||||||
|
end
|
||||||
if isCan==false then
|
if isCan==false then
|
||||||
PopupTipPanel.ShowTip("兵力不足")
|
PopupTipPanel.ShowTip("兵力不足")
|
||||||
return
|
return
|
||||||
|
|
@ -114,6 +118,11 @@ local itemList={}
|
||||||
function SmallSoldierLvInfoPanel:OnShow()
|
function SmallSoldierLvInfoPanel:OnShow()
|
||||||
curLv=SmallSoldierManager.level
|
curLv=SmallSoldierManager.level
|
||||||
local nextLv=curLv+1
|
local nextLv=curLv+1
|
||||||
|
if nextLv>50 then
|
||||||
|
nextLv=50
|
||||||
|
isMax=true
|
||||||
|
|
||||||
|
end
|
||||||
--local
|
--local
|
||||||
self.curlv.text="当前等级:"..curLv
|
self.curlv.text="当前等级:"..curLv
|
||||||
self.nextlv.text="下一等级:"..nextLv
|
self.nextlv.text="下一等级:"..nextLv
|
||||||
|
|
@ -168,6 +177,7 @@ function SmallSoldierLvInfoPanel:OnShow()
|
||||||
if SmallSoldierManager.upEndTime>0 then
|
if SmallSoldierManager.upEndTime>0 then
|
||||||
self:ShowLeftTime()
|
self:ShowLeftTime()
|
||||||
end
|
end
|
||||||
|
|
||||||
self.ScrollView:SetData(lotteryData, function (index, go)
|
self.ScrollView:SetData(lotteryData, function (index, go)
|
||||||
self:SingleDataShow(go,lotteryData[index])
|
self:SingleDataShow(go,lotteryData[index])
|
||||||
end,false)
|
end,false)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue