命格修改提交
parent
5e1cc83b2a
commit
18e10b4fb6
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,7 @@
|
|||
fileFormatVersion: 2
|
||||
guid: a05f88471b7e349448d9807b2fca723c
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -19154,6 +19154,80 @@ MonoBehaviour:
|
|||
m_FillClockwise: 1
|
||||
m_FillOrigin: 0
|
||||
m_UseSpriteMesh: 0
|
||||
--- !u!1 &3396625083540693087
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 9066177219582852668}
|
||||
- component: {fileID: 3857533036159120941}
|
||||
- component: {fileID: 5257971922384752166}
|
||||
m_Layer: 5
|
||||
m_Name: Image
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &9066177219582852668
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 3396625083540693087}
|
||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 1535527825289263518}
|
||||
m_RootOrder: 3
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||
m_AnchoredPosition: {x: 0.0015259, y: -210.5}
|
||||
m_SizeDelta: {x: 1080, y: 1525}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &3857533036159120941
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 3396625083540693087}
|
||||
m_CullTransparentMesh: 0
|
||||
--- !u!114 &5257971922384752166
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 3396625083540693087}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 0.03773582, g: 0.03720182, b: 0.03720182, a: 0.44705883}
|
||||
m_RaycastTarget: 1
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI,
|
||||
Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
|
||||
m_Sprite: {fileID: 0}
|
||||
m_Type: 0
|
||||
m_PreserveAspect: 0
|
||||
m_FillCenter: 1
|
||||
m_FillMethod: 4
|
||||
m_FillAmount: 1
|
||||
m_FillClockwise: 1
|
||||
m_FillOrigin: 0
|
||||
m_UseSpriteMesh: 0
|
||||
--- !u!1 &3410947377148270787
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
|
@ -19581,7 +19655,7 @@ GameObject:
|
|||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
m_IsActive: 0
|
||||
--- !u!224 &8641123955233707589
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
|
@ -27926,6 +28000,7 @@ RectTransform:
|
|||
- {fileID: 7625347215105360505}
|
||||
- {fileID: 1739992671986522819}
|
||||
- {fileID: 225546982228497842}
|
||||
- {fileID: 9066177219582852668}
|
||||
m_Father: {fileID: 4110496243653304681}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1772,7 +1772,10 @@ FUNCTION_OPEN_TYPE = {
|
|||
GodsWayTower_2=140,--多对塔2
|
||||
GodWeapon=141,--神兵
|
||||
EquipWish=142,--法宝心愿
|
||||
GemNew=144, --命格
|
||||
SuperGem=145,--高级命格
|
||||
Number_Game=149,--数字游戏
|
||||
|
||||
}
|
||||
|
||||
TaskGetBtnIconDef = {
|
||||
|
|
|
@ -1546,7 +1546,7 @@ function GetQuaStringByEquipQua(_Qua)
|
|||
elseif _Qua == 7 then
|
||||
return Language[12052]
|
||||
elseif _Qua == 8 then
|
||||
return Language[12052]
|
||||
return "[神话]"
|
||||
end
|
||||
end
|
||||
--通过item稀有度获取改颜色的文字
|
||||
|
@ -2858,6 +2858,7 @@ function CheckFunctionOpen(_funId)
|
|||
--2玩家等级开启
|
||||
--3鸿蒙阵神将等级
|
||||
--4购买礼包开启
|
||||
--6修行等级
|
||||
local openRule = data.OpenRules
|
||||
if openRule then
|
||||
if openRule[1] == 1 and not FightPointPassManager.IsFightPointPass(openRule[2]) then -- 关卡开启
|
||||
|
@ -2870,6 +2871,8 @@ function CheckFunctionOpen(_funId)
|
|||
return false
|
||||
elseif openRule[1] == 5 and GodsWayTowerManager.GetTowerFloorByType(1) < openRule[2] then
|
||||
return false
|
||||
elseif openRule[1] == 6 and PracticeManager.PracticeLevel<openRule[2] then --修行等级
|
||||
return false
|
||||
end
|
||||
end
|
||||
--1#创角
|
||||
|
@ -2920,6 +2923,10 @@ function GetFunctionOpenTip(_funId)
|
|||
return tip
|
||||
elseif openRule[1] == 5 and GodsWayTowerManager.GetTowerFloorByType(1) < openRule[2] then
|
||||
return tip
|
||||
elseif openRule[1] == 6 and PracticeManager.PracticeLevel<openRule[2] then
|
||||
local name=ConfigManager.GetConfigData(ConfigName.XiuXianConfig,openRule[2]).RealmName or ""
|
||||
tip=name.."期解锁"
|
||||
return tip
|
||||
end
|
||||
end
|
||||
--1#创角
|
||||
|
|
|
@ -500,6 +500,7 @@ UIName = {
|
|||
WishGemBuyOnePanel = 508, --命格单抽
|
||||
WishGemBuyTenPanel = 509, --命格十连
|
||||
GemRewardInfoPanel = 510, --命格宝箱奖励
|
||||
GemBoxLvUpPopup=511, --命石宝箱升级提示
|
||||
}
|
||||
|
||||
SubUIConfig = {
|
||||
|
|
|
@ -0,0 +1,96 @@
|
|||
----- 通用恭喜弹窗 -----
|
||||
require("Base/BasePanel")
|
||||
GemBoxLvUpPopup = Inherit(BasePanel)
|
||||
local this = GemBoxLvUpPopup
|
||||
local sorting = 0
|
||||
local SkeletonGraphic
|
||||
local idleFunc = function()
|
||||
SkeletonGraphic.AnimationState:SetAnimation(0, "idle2", true)
|
||||
end
|
||||
|
||||
--子模块脚本
|
||||
local contentScripts = {
|
||||
--神印信息
|
||||
[CONGRATULATION_TYPE.Practice] = {view = require("Modules/GeneralPanel/View3/CongratulationPopup_Practice"), panelName = "CongratulationPopup_Practice",idleName = "idle1"},
|
||||
}
|
||||
--子模块预设
|
||||
local contentPrefabs={}
|
||||
|
||||
--初始化组件(用于子类重写)
|
||||
function GemBoxLvUpPopup:InitComponent()
|
||||
sorting = 0
|
||||
this.mask = Util.GetGameObject(this.gameObject,"Mask")
|
||||
this.contents = Util.GetGameObject(this.gameObject,"Contents/Pages")
|
||||
this.effect = Util.GetGameObject(this.gameObject,"Contents/Pages/Shows/UI_effect_FightEndLvUp")
|
||||
this.roleEffect=Util.GetGameObject(self.transform, "Contents/Pages/Shows/npc")
|
||||
this.roleEffect.gameObject:SetActive(true)
|
||||
SkeletonGraphic = this.roleEffect:GetComponent("SkeletonGraphic")
|
||||
SkeletonGraphic.AnimationState.Complete = SkeletonGraphic.AnimationState.Complete + idleFunc
|
||||
this.info=Util.GetGameObject(this.gameObject,"Contents/Pages/CongratulationPopup_Practice/Text1"):GetComponent("Text")
|
||||
--子模块脚本初始化
|
||||
-- for key, value in pairs(contentScripts) do
|
||||
-- value.view:InitComponent(Util.GetGameObject(this.contents, value.panelName))
|
||||
-- end
|
||||
-- --预设赋值
|
||||
-- for key, value in pairs(contentScripts) do
|
||||
-- contentPrefabs[key]=Util.GetGameObject(this.contents,value.panelName)
|
||||
-- end
|
||||
end
|
||||
|
||||
--绑定事件(用于子类重写)
|
||||
function GemBoxLvUpPopup:BindEvent()
|
||||
-- for key, value in pairs(contentScripts) do
|
||||
-- value.view:BindEvent()
|
||||
-- end
|
||||
--返回按钮
|
||||
Util.AddClick(this.mask,function()
|
||||
self:ClosePanel()
|
||||
end)
|
||||
end
|
||||
|
||||
function GemBoxLvUpPopup:AddListener()
|
||||
-- for key, value in pairs(contentScripts) do
|
||||
-- value.view:AddListener()
|
||||
-- end
|
||||
end
|
||||
|
||||
function GemBoxLvUpPopup:RemoveListener()
|
||||
-- for key, value in pairs(contentScripts) do
|
||||
-- value.view:RemoveListener()
|
||||
-- end
|
||||
end
|
||||
|
||||
function GemBoxLvUpPopup:OnSortingOrderChange()
|
||||
Util.AddParticleSortLayer(this.effect,self.sortingOrder - sorting)
|
||||
sorting = self.sortingOrder
|
||||
end
|
||||
function GemBoxLvUpPopup:OnOpen(...)
|
||||
local args={...}
|
||||
this.effect:SetActive(true)
|
||||
this.info.text="宝箱等级已达到"..args[1].."级"
|
||||
local SkeletonGraphic = this.roleEffect:GetComponent("SkeletonGraphic")
|
||||
-- for key, value in pairs(contentPrefabs) do
|
||||
-- value.gameObject:SetActive(false)
|
||||
-- end
|
||||
--contentPrefabs[popupKey].gameObject:SetActive(true)
|
||||
--SkeletonGraphic.AnimationState:SetAnimation(0, contentScripts[popupKey].idleName, false)
|
||||
--contentScripts[popupKey].view:OnShow(this,...)--1、传入自己 2、传入不定参
|
||||
end
|
||||
|
||||
function GemBoxLvUpPopup:OnShow()
|
||||
end
|
||||
|
||||
function GemBoxLvUpPopup:OnClose()
|
||||
-- for key, value in pairs(contentScripts) do
|
||||
-- value.view:OnClose()
|
||||
-- end
|
||||
end
|
||||
|
||||
function GemBoxLvUpPopup:OnDestroy()
|
||||
-- for key, value in pairs(contentScripts) do
|
||||
-- value.view:OnDestroy()
|
||||
-- end
|
||||
SkeletonGraphic.AnimationState.Complete = SkeletonGraphic.AnimationState.Complete - idleFunc
|
||||
end
|
||||
|
||||
return GemBoxLvUpPopup
|
|
@ -0,0 +1,7 @@
|
|||
fileFormatVersion: 2
|
||||
guid: d1f9da208d4897448960b22774afa429
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -53,6 +53,33 @@ function this.InitGemsInfo(msg)
|
|||
end
|
||||
end
|
||||
|
||||
function this.ChangeOneGemData(_gem)
|
||||
local gemsData={}
|
||||
local config=gemConfig[_gem.id]
|
||||
gemsData.id=_gem.id
|
||||
gemsData.config=config
|
||||
gemsData.sId = _gem.id
|
||||
gemsData.backData = _gem
|
||||
gemsData.configData = config
|
||||
--local itemConfig = itemConfig[drop.pokemon[i].tempId]
|
||||
gemsData.name = config.Name
|
||||
-- itemdata.config=itemConfig
|
||||
gemsData.ItemType = 31--itemConfig.ItemType
|
||||
gemsData.frame = GetHeroQuantityImageByquality(config.Quality)
|
||||
gemsData.icon = GetResourcePath(config.Image)
|
||||
gemsData.num = 1
|
||||
local pros={}
|
||||
local proList=_gem.attr
|
||||
for j=1,#proList do
|
||||
--pros[proList[j].id]=proList[j].value
|
||||
pros[j]={proList[j].id,proList[j].value}
|
||||
end
|
||||
gemsData.pro=pros
|
||||
return gemsData
|
||||
end
|
||||
|
||||
|
||||
|
||||
--根据类型获取属性
|
||||
function this.GetProListByType(type)
|
||||
local list=nil
|
||||
|
|
|
@ -20,9 +20,9 @@ local drawType={
|
|||
}
|
||||
local TabBox = require("Modules/Common/TabBox")
|
||||
local _TabData={
|
||||
[1] = { default = "r_hero_xuanze_002", select = "r_hero_xuanze_001", name="修行", type=0 },
|
||||
[2] = { default = "r_hero_xuanze_002", select = "r_hero_xuanze_001", name="命格", type=1},
|
||||
[3] = { default = "r_hero_xuanze_002", select = "r_hero_xuanze_001", name="高级命格", type=2},
|
||||
[1] = { default = "r_hero_xuanze_002", select = "r_hero_xuanze_001", name="修行", type=0,funcId=136 },
|
||||
[2] = { default = "r_hero_xuanze_002", select = "r_hero_xuanze_001", name="命格", type=1, funcId=144 },
|
||||
[3] = { default = "r_hero_xuanze_002", select = "r_hero_xuanze_001", name="高级命格", type=2,funcId=145},
|
||||
}
|
||||
local TabAdapter=nil
|
||||
local SwitchView=nil
|
||||
|
@ -77,7 +77,6 @@ function Gem:InitComponent()
|
|||
tabLab:GetComponent("Text").text = _TabData[index].name
|
||||
local red=Util.GetGameObject(tab,"Redpot")
|
||||
red:SetActive(ActivityGiftManager.GetActivityInfo(ActivityTypeDef.shuaChongTeQuan,_TabData[index].id).state==1)
|
||||
|
||||
end
|
||||
--切换视图
|
||||
SwitchView=function(_index)
|
||||
|
@ -85,6 +84,12 @@ function Gem:InitComponent()
|
|||
UIManager.OpenPanel(UIName.PracticePanel)
|
||||
self:ClosePanel()
|
||||
else
|
||||
local isOpen=CheckFunctionOpen(_TabData[_index].funcId)
|
||||
local tip=GetFunctionOpenTip(_TabData[_index].funcId)
|
||||
if not isOpen then
|
||||
PopupTipPanel.ShowTip(tip)
|
||||
return
|
||||
end
|
||||
self:UpdatePanelData(_TabData[_index].type)
|
||||
end
|
||||
|
||||
|
@ -109,6 +114,7 @@ function Gem:InitComponent()
|
|||
--宝箱
|
||||
self.btn_box=Util.GetGameObject(self.gameObject, "btngroup/rewardBox/Btn")
|
||||
self.boxLv=Util.GetGameObject(self.gameObject, "btngroup/rewardBox/di/Text"):GetComponent("Text")
|
||||
self.boxIcon=Util.GetGameObject(self.gameObject, "btngroup/rewardBox/boxIcon")
|
||||
self.boxProgress=Util.GetGameObject(self.gameObject, "btngroup/rewardBox/progress/Text"):GetComponent("Text")
|
||||
self.proPreList={}
|
||||
for i=1,8 do
|
||||
|
@ -161,15 +167,22 @@ function Gem:UpdatePanelData(_type)
|
|||
else
|
||||
activityId=12401
|
||||
end
|
||||
local isCan=false
|
||||
local actconfigs=ActivityGiftManager.GetActivityInfoByType(activityId)
|
||||
if actconfigs then
|
||||
for i = 1,#actconfigs.mission do
|
||||
progresss=actconfigs.mission[i].progress
|
||||
local config=ConfigManager.TryGetConfigDataByDoubleKey(ConfigName.GemLotteryConfig,"Library",curType,"Level",actconfigs.mission[i].missionId)
|
||||
if actconfigs.mission[i].state==0 and progresss>=config.LibraryNumber then
|
||||
LogError("-------------------------------------------------")
|
||||
isCan=true
|
||||
break
|
||||
end
|
||||
end
|
||||
end
|
||||
local nextNum=0
|
||||
--LogError("progress==============="..progresss)
|
||||
|
||||
self.boxIcon:GetComponent("Animator").enabled = isCan
|
||||
for i, v in ConfigPairs(gemLottery) do
|
||||
if v.Library==_type and progresss>= v.LibraryNumber then
|
||||
wishLv=v.Level
|
||||
|
@ -198,6 +211,7 @@ function Gem:UpdatePanelData(_type)
|
|||
for k, v in pairs(proList) do
|
||||
local str=""
|
||||
index=index+1
|
||||
self.propertyList[index].gameObject:SetActive(true)
|
||||
if PropertyConfig[k].Style==1 then
|
||||
str=string.format( "<color=#00FF00>%s+%s</color>",PropertyConfig[k].Info,v)
|
||||
elseif PropertyConfig[k].Style==2 then
|
||||
|
@ -285,9 +299,9 @@ function Gem:Recruit(recrutType,num,costId)
|
|||
|
||||
NetManager.GemNewDrawRequest(recrutType,num,function(msg)
|
||||
if num == 1 then
|
||||
UIManager.OpenPanel(UIName.WishGemBuyOnePanel,msg.drop,recrutType,costId)
|
||||
UIManager.OpenPanel(UIName.WishGemBuyOnePanel,msg.drop,recrutType,costId,activityId)
|
||||
else
|
||||
UIManager.OpenPanel(UIName.WishGemBuyTenPanel,msg.drop,recrutType,costId)
|
||||
UIManager.OpenPanel(UIName.WishGemBuyTenPanel,msg.drop,recrutType,costId,activityId)
|
||||
end
|
||||
--CheckRedPointStatus(self.config.RpType)
|
||||
end)
|
||||
|
|
|
@ -40,6 +40,7 @@ function GemRewardInfoPanel:BindEvent()
|
|||
if isCan then
|
||||
LogError("actId===="..activityId.." data.missionId=="..rewardConfig.Level)
|
||||
ActivityGiftManager.GetActivityRewardRequest(activityId,rewardConfig.Level,function()
|
||||
Game.GlobalEvent:DispatchEvent(GameEvent.Gem.RefreshPanel)
|
||||
self:CheckReward()
|
||||
end)
|
||||
else
|
||||
|
@ -83,7 +84,7 @@ function GemRewardInfoPanel:OnShow()
|
|||
self.nextlv.text="下一等级:"..nextLv
|
||||
local qua=0
|
||||
for i=1,8 do
|
||||
list[i].curLv.text=curConfig.Show[1][i]/100 .."%"
|
||||
list[i].curLv.text=GetStringByEquipQua(i, GetQuaStringByEquipQua(i)).." "..curConfig.Show[1][i]/100 .."%"
|
||||
if curConfig.Show[1][i]>0 then
|
||||
qua=i
|
||||
end
|
||||
|
@ -105,7 +106,7 @@ function GemRewardInfoPanel:CheckReward()
|
|||
for i = 1,#actconfigs.mission do
|
||||
local config=ConfigManager.TryGetConfigDataByDoubleKey(ConfigName.GemLotteryConfig,"Library",curType,"Level",actconfigs.mission[i].missionId)
|
||||
LogError("config.id==="..config.Id)
|
||||
if actconfigs.mission[i].state==0 and config.Reward and #config.Reward>0 then
|
||||
if actconfigs.mission[i].state==0 and config.Reward and #config.Reward>0 and tonumber(config.Reward[1][1])~=nil then
|
||||
rewardConfig=config
|
||||
if progress>=config.LibraryNumber then
|
||||
isCan=true
|
||||
|
|
|
@ -174,8 +174,13 @@ function PlayerInfoPopup:InitComponent()
|
|||
for i = 1, 6 do
|
||||
table.insert(this.Weapons, Util.GetGameObject(self.gameObject, "tipImage/panel/weaponInfo/Demons/heroPro (" .. i .. ")"))
|
||||
end
|
||||
this.newGems={}
|
||||
for i=1,16 do
|
||||
table.insert(this.newGems, Util.GetGameObject(self.gameObject, "tipImage/panel/newGemInfo/Demons/heroPro (" .. i .. ")"))
|
||||
end
|
||||
this.pokemonObj=Util.GetGameObject(self.transform, "tipImage/panel/pokemonInfo").gameObject
|
||||
this.weaponInfo=Util.GetGameObject(self.transform, "tipImage/panel/weaponInfo")
|
||||
this.newGemInfo=Util.GetGameObject(self.transform, "tipImage/panel/newGemInfo")
|
||||
this.boxLine = Util.GetGameObject(self.transform, "tipImage/panel/defendbox/line")
|
||||
this.btnBox = Util.GetGameObject(self.transform, "tipImage/panel/box")
|
||||
-- this.bgImg= Util.GetGameObject(self.transform, "tipImage/tipImage"):GetComponent("RectTransform")
|
||||
|
@ -505,6 +510,28 @@ function this.FormationAdapter(teamInfo)
|
|||
end)
|
||||
end
|
||||
end
|
||||
--队伍命石信息
|
||||
local gems=teamInfo.gemNews
|
||||
if gems and #gems>0 then
|
||||
this.newGemInfo:SetActive(true)
|
||||
for i=1,16 do
|
||||
if gems[i] then
|
||||
this.newGems[i]:SetActive(true)
|
||||
local data=GemNewManager.ChangeOneGemData(gems[i])
|
||||
Util.GetGameObject(this.newGems[i], "frame"):GetComponent("Image").sprite = this.spLoader:LoadSprite(data.frame)
|
||||
Util.GetGameObject(this.newGems[i], "hero/icon"):GetComponent("Image").sprite = this.spLoader:LoadSprite(data.icon)
|
||||
local frameBtn = Util.GetGameObject(this.newGems[i], "frame")
|
||||
local heroData = {}
|
||||
Util.AddOnceClick(frameBtn, function()
|
||||
UIManager.OpenPanel(UIName.RewardGemSingleShowPopup,data,3)
|
||||
end)
|
||||
else
|
||||
this.newGems[i]:SetActive(false)
|
||||
end
|
||||
end
|
||||
else
|
||||
this.newGemInfo:SetActive(false)
|
||||
end
|
||||
--====================其他信息按钮显示======================
|
||||
this.infoIndex = 0
|
||||
for index, value in ipairs(InfoBtns) do
|
||||
|
|
|
@ -111,7 +111,14 @@ function Practice:BindEvent()
|
|||
end)
|
||||
|
||||
Util.AddClick(self.gemBtn, function()
|
||||
UIManager.OpenPanel(UIName.GemPanel,1)
|
||||
local isOpen= CheckFunctionOpen(FUNCTION_OPEN_TYPE.GemNew)
|
||||
if isOpen then
|
||||
UIManager.OpenPanel(UIName.GemPanel,1)
|
||||
else
|
||||
local tip=GetFunctionOpenTip(FUNCTION_OPEN_TYPE.GemNew)
|
||||
PopupTipPanel.ShowTip(tip)
|
||||
end
|
||||
|
||||
end)
|
||||
Util.AddClick(self.imprintBtn, function()
|
||||
if PracticeManager.PracticeBigLevel > 1 then
|
||||
|
|
|
@ -15,6 +15,8 @@ local freeTimesId = 0
|
|||
local recType = {}
|
||||
local orginLayer
|
||||
local costId=0
|
||||
local activityId=0
|
||||
local showLv=0
|
||||
--初始化组件(用于子类重写)
|
||||
function WishGemBuyOnePanel:InitComponent()
|
||||
this.spLoader = SpriteLoader.New()
|
||||
|
@ -51,8 +53,7 @@ function WishGemBuyOnePanel:BindEvent()
|
|||
Log(tostring(this.recruitType))
|
||||
|
||||
NetManager.GemNewDrawRequest(this.recruitType,1,function(msg)
|
||||
LogError("传入 costid=============="..costId)
|
||||
UIManager.OpenPanel(UIName.WishGemBuyOnePanel,msg.drop,this.recruitType,costId)
|
||||
UIManager.OpenPanel(UIName.WishGemBuyOnePanel,msg.drop,this.recruitType,costId,activityId)
|
||||
--CheckRedPointStatus(self.config.RpType)
|
||||
end)
|
||||
end)
|
||||
|
@ -89,8 +90,8 @@ function WishGemBuyOnePanel:OnOpen(...)
|
|||
local args = { ... }
|
||||
this.drop=args[1]
|
||||
this.recruitType=args[2]
|
||||
activityId=args[4]
|
||||
costId = args[3]
|
||||
LogError("costid==================="..costId)
|
||||
local str= ConfigManager.GetConfigData(ConfigName.SpecialConfig,costId).Value
|
||||
str=StringToTable(str)
|
||||
local d = RecruitManager.GetExpendDataByCostItem(str,1,100)
|
||||
|
@ -112,12 +113,31 @@ function WishGemBuyOnePanel:OnOpen(...)
|
|||
this.openOneAgainButton:GetComponent("Button").enabled=false
|
||||
local time = Timer.New(function ()
|
||||
this.openOneAgainButton:GetComponent("Button").enabled=true
|
||||
local itemDataList=BagManager.GetTableByBackDropData(this.drop)
|
||||
if itemDataList and #itemDataList>0 then
|
||||
end
|
||||
|
||||
end, 0.5)
|
||||
time:Start()
|
||||
|
||||
end
|
||||
|
||||
function WishGemBuyOnePanel:OnShow()
|
||||
local lv=0
|
||||
local actconfigs=ActivityGiftManager.GetActivityInfoByType(activityId)
|
||||
local progresss=0
|
||||
if actconfigs then
|
||||
for i = 1,#actconfigs.mission do
|
||||
progresss=actconfigs.mission[i].progress
|
||||
local config=ConfigManager.TryGetConfigDataByDoubleKey(ConfigName.GemLotteryConfig,"Library",this.recruitType,"Level",actconfigs.mission[i].missionId)
|
||||
if actconfigs.mission[i].state==0 and progresss>=config.LibraryNumber then
|
||||
lv=config.Level
|
||||
end
|
||||
end
|
||||
end
|
||||
if lv>0 and lv>showLv then
|
||||
showLv=lv
|
||||
UIManager.OpenPanel(UIName.GemBoxLvUpPopup,lv)
|
||||
end
|
||||
end
|
||||
|
||||
--界面关闭时调用(用于子类重写)
|
||||
function WishGemBuyOnePanel:OnClose()
|
||||
|
||||
|
@ -135,25 +155,7 @@ function WishGemBuyOnePanel:OnDestroy()
|
|||
end
|
||||
end
|
||||
|
||||
---寻仙倒计时(活动结束切换表现)
|
||||
function this.FindFairyCountDown(timeDown)
|
||||
if this.timer then
|
||||
this.timer:Stop()
|
||||
this.timer = nil
|
||||
end
|
||||
this.timer = Timer.New(function()
|
||||
if timeDown < 1 then
|
||||
this.timer:Stop()
|
||||
this.timer = nil
|
||||
this.btnBack:GetComponent("RectTransform"):DOAnchorPosX(0, 0, true)
|
||||
this.openOneAgainButton:SetActive(false)
|
||||
PopupTipPanel.ShowTip(Language[11842])
|
||||
return
|
||||
end
|
||||
timeDown = timeDown - 1
|
||||
end, 1, -1, true)
|
||||
this.timer:Start()
|
||||
end
|
||||
|
||||
|
||||
return WishGemBuyOnePanel
|
||||
|
||||
|
|
|
@ -11,6 +11,8 @@ local itemNum=0 --抽卡小号道具数量
|
|||
local lotterySetting = ConfigManager.GetConfig(ConfigName.LotterySetting)
|
||||
local callList = Stack.New()
|
||||
local costId=0
|
||||
local activityId=0
|
||||
local isShowLv=0
|
||||
this.contentList={}
|
||||
this.contentListParent={}
|
||||
this.isElementDrawPanel=false
|
||||
|
@ -59,7 +61,7 @@ function WishGemBuyTenPanel:BindEvent()
|
|||
return
|
||||
end
|
||||
NetManager.GemNewDrawRequest(this.recruitType,costId,function(msg)
|
||||
UIManager.OpenPanel(UIName.WishGemBuyTenPanel,msg.drop,this.recruitType,costId)
|
||||
UIManager.OpenPanel(UIName.WishGemBuyTenPanel,msg.drop,this.recruitType,costId,activityId)
|
||||
--CheckRedPointStatus(self.config.RpType)
|
||||
end)
|
||||
end)
|
||||
|
@ -98,6 +100,24 @@ function WishGemBuyTenPanel:OnOpen(...)
|
|||
this.drop=args[1]
|
||||
this.recruitType=args[2]
|
||||
costId=args[3]
|
||||
activityId=args[4]
|
||||
local lv=0
|
||||
--宝箱等级
|
||||
local actconfigs=ActivityGiftManager.GetActivityInfoByType(activityId)
|
||||
local progresss=0
|
||||
if actconfigs then
|
||||
for i = 1,#actconfigs.mission do
|
||||
progresss=actconfigs.mission[i].progress
|
||||
local config=ConfigManager.TryGetConfigDataByDoubleKey(ConfigName.GemLotteryConfig,"Library",this.recruitType ,"Level",actconfigs.mission[i].missionId)
|
||||
if actconfigs.mission[i].state==0 and progresss>=config.LibraryNumber then
|
||||
lv=config.Level
|
||||
end
|
||||
end
|
||||
end
|
||||
if lv>0 and lv>isShowLv then
|
||||
isShowLv=lv
|
||||
UIManager.OpenPanel(UIName.GemBoxLvUpPopup,lv)
|
||||
end
|
||||
LogError("costid============"..costId)
|
||||
local str= ConfigManager.GetConfigData(ConfigName.SpecialConfig,costId).Value
|
||||
str=StringToTable(str)
|
||||
|
@ -161,25 +181,7 @@ function WishGemBuyTenPanel:OnDestroy()
|
|||
end
|
||||
end
|
||||
|
||||
---寻仙倒计时(活动结束切换表现)
|
||||
function this.FindFairyCountDown(timeDown)
|
||||
if this.timer then
|
||||
this.timer:Stop()
|
||||
this.timer = nil
|
||||
end
|
||||
this.timer = Timer.New(function()
|
||||
if timeDown < 1 then
|
||||
this.timer:Stop()
|
||||
this.timer = nil
|
||||
this.btnBack:GetComponent("RectTransform"):DOAnchorPosX(0, 0, true)
|
||||
this.openTenAgainButton:SetActive(false)
|
||||
PopupTipPanel.ShowTip(Language[11842])
|
||||
return
|
||||
end
|
||||
timeDown = timeDown - 1
|
||||
end, 1, -1, true)
|
||||
this.timer:Start()
|
||||
end
|
||||
|
||||
|
||||
return WishGemBuyTenPanel
|
||||
|
||||
|
|
Loading…
Reference in New Issue