替换灵域

tcx_xiyou_test
sean 2024-01-18 21:38:32 +08:00
parent 225ab7efc6
commit 328c0e0700
7 changed files with 680 additions and 866 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 102 KiB

After

Width:  |  Height:  |  Size: 92 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 101 KiB

After

Width:  |  Height:  |  Size: 91 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 752 KiB

After

Width:  |  Height:  |  Size: 442 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 777 KiB

After

Width:  |  Height:  |  Size: 461 KiB

View File

@ -2749,7 +2749,7 @@ GameObject:
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 0
m_IsActive: 1
--- !u!224 &437974856277732987
RectTransform:
m_ObjectHideFlags: 0
@ -2764,11 +2764,11 @@ RectTransform:
m_Father: {fileID: 1492499629588067375}
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: 57.8, y: 43.4}
m_AnchorMin: {x: 1, y: 1}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: -0.000030517578, y: 0}
m_SizeDelta: {x: 26, y: 26}
m_Pivot: {x: 0.5, y: 0.5}
m_Pivot: {x: 1, y: 1}
--- !u!222 &8917917931093070100
CanvasRenderer:
m_ObjectHideFlags: 0

View File

@ -27,15 +27,15 @@ local titleBg={
}
--难度图片
local qualityBg={
[1]={s="gm_richang_jd_zh",b="gm_richang_di1",name="简单"},
[2]={s="gm_richang_pt_zh",b="gm_richang_di1",name="普通"},
[3]={s="gm_richang_kn_zh",b="gm_richang_di1",name="困难"},
[4]={s="gm_richang_em_zh",b="gm_richang_di1",name="噩梦"},
[5]={s="gm_richang_ly_zh",b="gm_richang_di2",name="炼狱"},
[6]={s="gm_richang_dy_zh",b="gm_richang_di2",name="地狱"},
[7]={s="gm_richang_sy_zh",b="gm_richang_di2",name="深渊"},
[8]={s="gm_richang_cq_zh",b="gm_richang_di2",name="传奇"},
[9]={s="gm_richang_sh_zh",b="gm_richang_di2",name="神话"}
[1]={s="gm_richang_jd_zh",b="gm_richang_di1",name="<color=#D2D2D0>简单</color>"},
[2]={s="gm_richang_pt_zh",b="gm_richang_di1",name="<color=#7EE11F>普通</color>"},
[3]={s="gm_richang_kn_zh",b="gm_richang_di1",name="<color=#FC9E3A>困难</color>"},
[4]={s="gm_richang_em_zh",b="gm_richang_di1",name="<color=#D736FA>噩梦</color>"},
[5]={s="gm_richang_ly_zh",b="gm_richang_di2",name="<color=#FE3B51>炼狱</color>"},
[6]={s="gm_richang_dy_zh",b="gm_richang_di2",name="<color=#FE3B51>地狱</color>"},
[7]={s="gm_richang_sy_zh",b="gm_richang_di2",name="<color=#FE3B51>深渊</color>"},
[8]={s="gm_richang_cq_zh",b="gm_richang_di2",name="<color=#FE3B51>传奇</color>"},
[9]={s="gm_richang_sh_zh",b="gm_richang_di2",name="<color=#FE3B51>神话</color>"}
}
local itemList={}--奖励容器
@ -47,15 +47,9 @@ local maxBuyTime=0
local maxFreeTime=0
--Tab
local TabBox = require("Modules/Common/TabBox")
local _TabData={ [1] = { default = "r_richang_anniu_jinbi_01_zh", select = "r_richang_anniu_jinbi_zh",lock = "r_richang_anniu_jinbi_zh", name = Language[10282],type=FUNCTION_OPEN_TYPE.DAILYCHALLENGE_COIN },
[2] = { default = "r_richang_anniu_jingyan_01_zh", select = "r_richang_anniu_jingyan_zh",lock = "r_richang_anniu_jingyan_zh", name = Language[10283],type=FUNCTION_OPEN_TYPE.DAILYCHALLENGE_EXP },
--[3] = { default = "r_richang_anniu_lieyaoshi_01_zh", select = "r_richang_anniu_lieyaoshi_zh",lock = "r_richang_anniu_lieyaoshi_zh", name = Language[10284],type=FUNCTION_OPEN_TYPE.DAILYCHALLENGE_HERODEBRIS },
--[4] = { default = "r_richang_anniu_fabao_01_zh", select = "r_richang_anniu_fabao_zh",lock = "r_richang_anniu_fabao_zh", name = Language[10285],type=FUNCTION_OPEN_TYPE.DAILYCHALLENGE_TALISMAN },
--[5] = { default = "r_richang_anniu_hunyin_01_zh", select = "r_richang_anniu_hunyin_zh",lock = "r_richang_anniu_hunyin_zh", name = Language[10286],type=FUNCTION_OPEN_TYPE.DAILYCHALLENGE_SOULPRINT }
local _TabData={ [1] = { default = "chall_tab_btn1", select = "chall_tab_btn1",lock = "chall_tab_btn1", name = Language[10282],type=FUNCTION_OPEN_TYPE.DAILYCHALLENGE_COIN },
[2] = { default = "chall_tab_btn2", select = "chall_tab_btn2",lock = "chall_tab_btn2", name = Language[10283],type=FUNCTION_OPEN_TYPE.DAILYCHALLENGE_EXP },
}
local _TabFontColor = { default = Color.New(130 / 255, 128 / 255, 120 / 255, 1),
select = Color.New(243 / 255, 235 / 255, 202 / 255, 1),
lock=Color.New(243 / 255, 235 / 255, 202 / 255, 1)}
function DailyCarbonPanel:InitComponent()
this.spLoader = SpriteLoader.New()
@ -72,7 +66,7 @@ function DailyCarbonPanel:InitComponent()
this.pre = Util.GetGameObject(this.panel, "Scroll/Pre")
this.scroll = Util.GetGameObject(this.panel, "Scroll")
this.scrollView = SubUIManager.Open(SubUIConfig.ScrollCycleView,this.scroll.transform,
this.pre, nil, Vector2.New(992.4, 1205.6), 1, 1, Vector2.New(40, 10))
this.pre, nil, Vector2.New(1078, 985), 1, 1, Vector2.New(0, 15))
this.scrollView.moveTween.MomentumAmount = 1
this.scrollView.moveTween.Strength = 2
@ -240,7 +234,6 @@ function this.SetScroll(i,isTop,isAni)
else
aaa.state=2
end
--table.insert(list,aaa)
list[k]=aaa
end
table.sort(list,function(a,b)
@ -253,12 +246,6 @@ function this.SetScroll(i,isTop,isAni)
this.scrollView:SetData(list,function(index,root)
this.SetData(root,list[index].config, list[index - 1],list[index].state)
end,not isTop,not isAni)
LogError("curMaxOpenId=="..curMaxOpenId)
-- if CarbonManager.IsDailyCarbonPass(curData[#curData].Id) then
-- curMaxOpenId = #curData
-- end
-- this.scrollView:SetIndex(curMaxOpenId - 2 < 1 and 1 or (curMaxOpenId - 2))
end
--设置滚动条数据 root根节点 data本地表数据 ldata 上一条数据
@ -266,6 +253,7 @@ function this.SetData(root, data, ldata,state)
local type=0 --0为未开启 1为挑战 2为扫荡
local bgQuality=Util.GetGameObject(root,"Bg"):GetComponent("Image")
local title=Util.GetGameObject(root,"Title"):GetComponent("Image")
local textDifficulty = Util.GetGameObject(root, "TextDifficulty"):GetComponent("Text")
local frame=Util.GetGameObject(root,"frame"):GetComponent("Image")
local reward=Util.GetGameObject(root,"Reward")
local tip=Util.GetGameObject(root,"Tip"):GetComponent("Text")
@ -281,6 +269,7 @@ function this.SetData(root, data, ldata,state)
local storeData=ConfigManager.GetConfigDataByDoubleKey(ConfigName.StoreConfig,"StoreId",7,"Limit",data.PrivilegeId[1])--商店表数据
title.sprite=this.spLoader:LoadSprite(qualityBg[data.Quality].s)
title:SetNativeSize()
textDifficulty.text = qualityBg[data.Quality].name
frame.sprite=this.spLoader:LoadSprite(qualityBg[data.Quality].b)
ResetItemView(root,reward.transform,itemList,3,0.9,orginLayer,false,data.RewardView)
--LogError("state==="..state)
@ -328,7 +317,8 @@ function this.SetData(root, data, ldata,state)
goBtnImage.sprite=this.spLoader:LoadSprite("s_slbz_1anniuhuangse")
--power.text = _power--string.format(Language[10288], _power)
--power.transform.parent.gameObject:SetActive(true)
info.text=string.format("战斗力达到%s可挑战",_power)
--info.text=string.format("战斗力达到%s可挑战",_power)
info.text=string.format("%s",_power)
tip.gameObject:SetActive(false)
type=1
elseif state==2 then
@ -338,14 +328,16 @@ function this.SetData(root, data, ldata,state)
tip.gameObject:SetActive(true)
tip.text="未达成"
info.text=string.format("战斗力达到%s可挑战",_power)
--info.text=string.format("战斗力达到%s可挑战",_power)
info.text=string.format("%s",_power)
--power.transform.parent.gameObject:SetActive(true)
type=0
elseif state==3 then
--goIcon:SetActive(state==1 and freeTime<=0)
--ssgoIconNum:SetActive(state==1 and freeTime<=0)
type=2
info.text=string.format("战斗力达到%s可挑战",_power)
--info.text=string.format("战斗力达到%s可挑战",_power)
info.text=string.format("%s",_power)
-- goBtnText.text=Language[10289]
-- goBtnImage.sprite=this.spLoader:LoadSprite("s_slbz_1anniuhuise")
goBtn:SetActive(false)
@ -455,16 +447,15 @@ end
-- tab节点显示自定义
function this.TabAdapter(tab, index, status)
-- local tabLab = Util.GetGameObject(tab, "Text")
local lock = Util.GetGameObject(tab, "LockImage")
local islock = status == "lock"
Util.SetGray( Util.GetGameObject(tab,"Image").gameObject, islock)
lock:SetActive(islock)
Util.GetGameObject(tab,"Image"):GetComponent("Image").sprite = this.spLoader:LoadSprite(_TabData[index][status])
-- tabLab:GetComponent("Text").text = _TabData[index].name
-- tabLab:GetComponent("Text").color = _TabFontColor[status]
Util.GetGameObject(tab,"Text"):GetComponent("Text").text = _TabData[index].name
end
function this.TabIsLockCheck(index)
if not ActTimeCtrlManager.SingleFuncState(_TabData[index].type) then
return true,ActTimeCtrlManager.SystemOpenTip(_TabData[index].type)