日常副本修改提交
parent
106c095086
commit
e840b0d42a
|
@ -1,5 +1,158 @@
|
|||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!1 &786095121
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 786095122}
|
||||
- component: {fileID: 786095124}
|
||||
- component: {fileID: 786095123}
|
||||
m_Layer: 5
|
||||
m_Name: info
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &786095122
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 786095121}
|
||||
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: 2239549473092137549}
|
||||
m_RootOrder: 8
|
||||
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: -101, y: 79.3}
|
||||
m_SizeDelta: {x: 160, y: 30}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &786095124
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 786095121}
|
||||
m_CullTransparentMesh: 0
|
||||
--- !u!114 &786095123
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 786095121}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 708705254, guid: f70555f144d8491a825f0804e09c671c, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 0.36078432, g: 0.32941177, b: 0.25490198, a: 1}
|
||||
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_FontData:
|
||||
m_Font: {fileID: 12800000, guid: 4b73e9e4512d17e4daeea351e090d33c, type: 3}
|
||||
m_FontSize: 30
|
||||
m_FontStyle: 0
|
||||
m_BestFit: 0
|
||||
m_MinSize: 3
|
||||
m_MaxSize: 40
|
||||
m_Alignment: 3
|
||||
m_AlignByGeometry: 0
|
||||
m_RichText: 1
|
||||
m_HorizontalOverflow: 1
|
||||
m_VerticalOverflow: 1
|
||||
m_LineSpacing: 1
|
||||
m_Text: New Text
|
||||
--- !u!1 &1599634961
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1599634962}
|
||||
- component: {fileID: 1599634964}
|
||||
- component: {fileID: 1599634963}
|
||||
m_Layer: 5
|
||||
m_Name: Image
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &1599634962
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1599634961}
|
||||
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: 2239549473092137549}
|
||||
m_RootOrder: 1
|
||||
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: 47.6, y: 80.5}
|
||||
m_SizeDelta: {x: 797.1, y: 30.9}
|
||||
m_Pivot: {x: 0.51510733, y: 0.500001}
|
||||
--- !u!222 &1599634964
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1599634961}
|
||||
m_CullTransparentMesh: 0
|
||||
--- !u!114 &1599634963
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1599634961}
|
||||
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.7568628, g: 0.7254902, b: 0.64705884, a: 1}
|
||||
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: 1
|
||||
m_PreserveAspect: 0
|
||||
m_FillCenter: 1
|
||||
m_FillMethod: 4
|
||||
m_FillAmount: 1
|
||||
m_FillClockwise: 1
|
||||
m_FillOrigin: 0
|
||||
m_UseSpriteMesh: 0
|
||||
--- !u!1 &39637761430653143
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
|
@ -296,7 +449,7 @@ RectTransform:
|
|||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 2239549473092137549}
|
||||
m_RootOrder: 2
|
||||
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}
|
||||
|
@ -1265,11 +1418,11 @@ RectTransform:
|
|||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 2239549473092137549}
|
||||
m_RootOrder: 3
|
||||
m_RootOrder: 4
|
||||
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: -29.6, y: -3.8}
|
||||
m_AnchoredPosition: {x: -29.6, y: -19}
|
||||
m_SizeDelta: {x: 386.2, y: 137.7}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!114 &6899759931426735578
|
||||
|
@ -1486,11 +1639,11 @@ RectTransform:
|
|||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 2239549473092137549}
|
||||
m_RootOrder: 4
|
||||
m_RootOrder: 5
|
||||
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: 255.57, y: 34.5}
|
||||
m_AnchoredPosition: {x: 266, y: -10}
|
||||
m_SizeDelta: {x: 220.99, y: 42.04}
|
||||
m_Pivot: {x: 0.36038244, y: 0.5}
|
||||
--- !u!222 &5939520279966165509
|
||||
|
@ -1523,11 +1676,11 @@ MonoBehaviour:
|
|||
Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
|
||||
m_FontData:
|
||||
m_Font: {fileID: 12800000, guid: 4b73e9e4512d17e4daeea351e090d33c, type: 3}
|
||||
m_FontSize: 30
|
||||
m_FontSize: 50
|
||||
m_FontStyle: 0
|
||||
m_BestFit: 0
|
||||
m_MinSize: 2
|
||||
m_MaxSize: 40
|
||||
m_MaxSize: 50
|
||||
m_Alignment: 4
|
||||
m_AlignByGeometry: 0
|
||||
m_RichText: 1
|
||||
|
@ -1564,12 +1717,14 @@ RectTransform:
|
|||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children:
|
||||
- {fileID: 8420361761945447324}
|
||||
- {fileID: 1599634962}
|
||||
- {fileID: 8597068808526366103}
|
||||
- {fileID: 1421105423562867200}
|
||||
- {fileID: 6403195048930280866}
|
||||
- {fileID: 6530197106428225390}
|
||||
- {fileID: 1221379356726746056}
|
||||
- {fileID: 6706942462312295341}
|
||||
- {fileID: 786095122}
|
||||
m_Father: {fileID: 3408442198697653928}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
|
@ -1595,7 +1750,7 @@ GameObject:
|
|||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
m_IsActive: 0
|
||||
--- !u!224 &1221379356726746056
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
|
@ -1609,7 +1764,7 @@ RectTransform:
|
|||
m_Children:
|
||||
- {fileID: 2800389897786691465}
|
||||
m_Father: {fileID: 2239549473092137549}
|
||||
m_RootOrder: 5
|
||||
m_RootOrder: 6
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
|
@ -1687,7 +1842,7 @@ RectTransform:
|
|||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0.5}
|
||||
m_AnchorMax: {x: 0, y: 0.5}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_AnchoredPosition: {x: 0.0000000082547675, y: 0}
|
||||
m_SizeDelta: {x: 0, y: 100}
|
||||
m_Pivot: {x: 0, y: 0.5}
|
||||
--- !u!114 &4153919401695343612
|
||||
|
@ -1965,11 +2120,11 @@ RectTransform:
|
|||
- {fileID: 8797316285502679983}
|
||||
- {fileID: 3345945376859019430}
|
||||
m_Father: {fileID: 2239549473092137549}
|
||||
m_RootOrder: 6
|
||||
m_RootOrder: 7
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 754.06, y: -146.9}
|
||||
m_AnchoredPosition: {x: 754.06, y: -130}
|
||||
m_SizeDelta: {x: 246.27, y: 70}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &5679312751743760484
|
||||
|
@ -2163,7 +2318,7 @@ RectTransform:
|
|||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0.5, y: 1}
|
||||
m_AnchorMax: {x: 0.5, y: 1}
|
||||
m_AnchoredPosition: {x: 0, y: -231.02124}
|
||||
m_AnchoredPosition: {x: 0, y: -231.021}
|
||||
m_SizeDelta: {x: 1080, y: 464}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &6616730211952462319
|
||||
|
@ -2534,7 +2689,7 @@ RectTransform:
|
|||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 2239549473092137549}
|
||||
m_RootOrder: 1
|
||||
m_RootOrder: 2
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||
|
|
|
@ -27,15 +27,15 @@ local titleBg={
|
|||
}
|
||||
--难度图片
|
||||
local qualityBg={
|
||||
[1]={s="gm_richang_jd_zh",b="gm_richang_di1"},
|
||||
[2]={s="gm_richang_pt_zh",b="gm_richang_di1"},
|
||||
[3]={s="gm_richang_kn_zh",b="gm_richang_di1"},
|
||||
[4]={s="gm_richang_em_zh",b="gm_richang_di1"},
|
||||
[5]={s="gm_richang_ly_zh",b="gm_richang_di2"},
|
||||
[6]={s="gm_richang_dy_zh",b="gm_richang_di2"},
|
||||
[7]={s="gm_richang_sy_zh",b="gm_richang_di2"},
|
||||
[8]={s="gm_richang_cq_zh",b="gm_richang_di2"},
|
||||
[9]={s="gm_richang_sh_zh",b="gm_richang_di2"}
|
||||
[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="神话"}
|
||||
}
|
||||
|
||||
local itemList={}--奖励容器
|
||||
|
@ -43,7 +43,8 @@ local itemList={}--奖励容器
|
|||
--每日副本服务器数据
|
||||
local buyTime=0--购买次数
|
||||
local freeTime=0--免费次数
|
||||
|
||||
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 },
|
||||
|
@ -176,25 +177,92 @@ end
|
|||
|
||||
|
||||
--设置滚动条
|
||||
local curMaxOpenId = 0
|
||||
local curMaxOpenId = 1
|
||||
local curName=""
|
||||
function this.SetScroll(i,isTop,isAni)
|
||||
this.scrollView:SetData(curData,function(index,root)
|
||||
this.SetData(root,curData[index], curData[index - 1])
|
||||
end,not isTop,not isAni)
|
||||
local list={}
|
||||
for k,v in ipairs(curData) do
|
||||
if not CarbonManager.IsDailyCarbonPass(v.Id) then
|
||||
curMaxOpenId = k
|
||||
curMaxOpenId = v.Quality
|
||||
break
|
||||
end
|
||||
end
|
||||
local isEnd=false
|
||||
if CarbonManager.IsDailyCarbonPass(curData[#curData].Id) then
|
||||
isEnd=true
|
||||
curMaxOpenId = #curData
|
||||
end
|
||||
this.scrollView:SetIndex(curMaxOpenId - 2 < 1 and 1 or (curMaxOpenId - 2))
|
||||
curName=qualityBg[curMaxOpenId].name
|
||||
this.timeTip.text="当前难度:"..curName
|
||||
--state 1:挑战 2:未开启 3.扫荡
|
||||
for k,v in ipairs(curData) do
|
||||
local aaa={}
|
||||
aaa.config=v
|
||||
--解锁状态
|
||||
local _lv=0 --等级
|
||||
local _point=0 --关卡
|
||||
local _power = 0 --data.ForceShow--表战力
|
||||
|
||||
for i = 1, #v.OpenRules do
|
||||
if v.OpenRules[i][1] == 1 then
|
||||
_lv = v.OpenRules[i][2]
|
||||
elseif v.OpenRules[i][1] == 2 then
|
||||
_point = v.OpenRules[i][2]
|
||||
elseif v.OpenRules[i][1] == 3 then
|
||||
_power = v.OpenRules[i][2]
|
||||
end
|
||||
end
|
||||
-- LogError("lv==".._lv.." point==".._point.." power==".._power)
|
||||
local lastData=curData[k-1]
|
||||
-- 判断每日副本是否解锁
|
||||
local isOpen = (not lastData or CarbonManager.IsDailyCarbonPass(lastData.Id)) -- 上一个副本解锁
|
||||
and PlayerManager.level >= _lv -- 等级
|
||||
and (_point == 0 or FightPointPassManager.IsFightPointPass(_point))
|
||||
and PlayerManager.maxForce >= _power -- 战斗力
|
||||
if isOpen then
|
||||
if CarbonManager.IsDailyCarbonPass(v.Id) then
|
||||
if isEnd then
|
||||
if v.Quality==curMaxOpenId then
|
||||
aaa.state=0
|
||||
else
|
||||
aaa.state=3
|
||||
end
|
||||
else
|
||||
if v.Quality==curMaxOpenId-1 then
|
||||
aaa.state=0
|
||||
else
|
||||
aaa.state=3
|
||||
end
|
||||
end
|
||||
else
|
||||
aaa.state=1
|
||||
end
|
||||
else
|
||||
aaa.state=2
|
||||
end
|
||||
--table.insert(list,aaa)
|
||||
list[k]=aaa
|
||||
end
|
||||
table.sort(list,function(a,b)
|
||||
if a.state==b.state then
|
||||
return a.config.Id<b.config.Id
|
||||
else
|
||||
return a.state<b.state
|
||||
end
|
||||
end)
|
||||
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 上一条数据
|
||||
function this.SetData(root, data, ldata)
|
||||
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")
|
||||
|
@ -202,6 +270,7 @@ function this.SetData(root, data, ldata)
|
|||
local reward=Util.GetGameObject(root,"Reward")
|
||||
local tip=Util.GetGameObject(root,"Tip"):GetComponent("Text")
|
||||
local power=Util.GetGameObject(root,"powerBtn/value"):GetComponent("Text")
|
||||
local info=Util.GetGameObject(root,"info"):GetComponent("Text")
|
||||
local goBtn=Util.GetGameObject(root,"GoBtn")
|
||||
local goBtnImage=goBtn:GetComponent("Image")
|
||||
local goBtnText=Util.GetGameObject(goBtn,"Text"):GetComponent("Text")
|
||||
|
@ -214,7 +283,7 @@ function this.SetData(root, data, ldata)
|
|||
title:SetNativeSize()
|
||||
frame.sprite=this.spLoader:LoadSprite(qualityBg[data.Quality].b)
|
||||
ResetItemView(root,reward.transform,itemList,3,0.9,orginLayer,false,data.RewardView)
|
||||
|
||||
--LogError("state==="..state)
|
||||
--解锁状态
|
||||
local _lv=0 --等级
|
||||
local _point=0 --关卡
|
||||
|
@ -240,7 +309,7 @@ function this.SetData(root, data, ldata)
|
|||
end
|
||||
|
||||
-- 判断每日副本是否解锁
|
||||
local isOpen = (not ldata or CarbonManager.IsDailyCarbonPass(ldata.Id)) -- 上一个副本解锁
|
||||
local isOpen = (not ldata or CarbonManager.IsDailyCarbonPass(ldata.config.Id)) -- 上一个副本解锁
|
||||
and PlayerManager.level >= _lv -- 等级
|
||||
and (_point == 0 or FightPointPassManager.IsFightPointPass(_point))
|
||||
and PlayerManager.maxForce >= _power -- 战斗力
|
||||
|
@ -251,33 +320,51 @@ function this.SetData(root, data, ldata)
|
|||
if freeTime<=0 then
|
||||
goIconNumText.text=storeData.Cost[2][4]
|
||||
end
|
||||
goBtn:SetActive(false)
|
||||
--表现显示
|
||||
Util.SetGray(goBtn, not isOpen)
|
||||
if isOpen then
|
||||
type=1
|
||||
if state==1 then
|
||||
goBtnText.text=Language[10287]
|
||||
goBtn:SetActive(true)
|
||||
goBtnImage.sprite=this.spLoader:LoadSprite("s_slbz_1anniuhuangse")
|
||||
power.text = _power--string.format(Language[10288], _power)
|
||||
power.transform.parent.gameObject:SetActive(true)
|
||||
--power.text = _power--string.format(Language[10288], _power)
|
||||
--power.transform.parent.gameObject:SetActive(true)
|
||||
info.text=string.format("战斗力达到%s可挑战",_power)
|
||||
tip.gameObject:SetActive(false)
|
||||
if CarbonManager.IsDailyCarbonPass(data.Id) then
|
||||
goIcon:SetActive(isOpen and freeTime<=0)
|
||||
goIconNum:SetActive( isOpen and freeTime<=0)
|
||||
type=2
|
||||
goBtnText.text=Language[10289]
|
||||
goBtnImage.sprite=this.spLoader:LoadSprite("s_slbz_1anniuhuise")
|
||||
tip.text=Language[10290]
|
||||
tip.gameObject:SetActive(true)
|
||||
power.transform.parent.gameObject:SetActive(false)
|
||||
end
|
||||
else
|
||||
type=1
|
||||
elseif state==2 then
|
||||
--power.text = _power --string.format(Language[10291], _power)
|
||||
--goBtnText.text=Language[10292]
|
||||
goBtn:SetActive(false)
|
||||
|
||||
tip.gameObject:SetActive(true)
|
||||
tip.text="未达成"
|
||||
info.text=string.format("战斗力达到%s可挑战",_power)
|
||||
--power.transform.parent.gameObject:SetActive(true)
|
||||
type=0
|
||||
power.text = _power --string.format(Language[10291], _power)
|
||||
goBtnText.text=Language[10292]
|
||||
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)
|
||||
-- goBtnText.text=Language[10289]
|
||||
-- goBtnImage.sprite=this.spLoader:LoadSprite("s_slbz_1anniuhuise")
|
||||
goBtn:SetActive(false)
|
||||
tip.text="已达成"
|
||||
tip.gameObject:SetActive(true)
|
||||
--power.transform.parent.gameObject:SetActive(false)
|
||||
elseif state==0 then
|
||||
goIcon:SetActive(freeTime<=0)
|
||||
goIconNum:SetActive(freeTime<=0)
|
||||
goBtn:SetActive(true)
|
||||
type=2
|
||||
goBtnText.text="可扫荡"
|
||||
info.text=string.format("当前奖励 (今日%s/%s次)",buyTime+freeTime,maxBuyTime+maxFreeTime)
|
||||
goBtnImage.sprite=this.spLoader:LoadSprite("s_slbz_1anniuhuangse")
|
||||
tip.gameObject:SetActive(false)
|
||||
power.transform.parent.gameObject:SetActive(true)
|
||||
--power.transform.parent.gameObject:SetActive(false)
|
||||
end
|
||||
power.color = PlayerManager.maxForce >= _power and UIColor.WRITE or UIColor.RED
|
||||
--Util.SetGray(goBtn,state==1)
|
||||
|
||||
|
||||
--点击事件
|
||||
Util.AddOnceClick(goBtn,function()
|
||||
|
@ -296,7 +383,7 @@ function this.SetData(root, data, ldata)
|
|||
-- return
|
||||
end
|
||||
|
||||
if not isOpen then
|
||||
if state==2 then
|
||||
PopupTipPanel.ShowTip(Language[10296])
|
||||
return
|
||||
end
|
||||
|
@ -322,7 +409,7 @@ function this.SetData(root, data, ldata)
|
|||
-- TODO: 没有战斗结果校验
|
||||
NetManager.DailyChallengeRequest(data.Id,type,function(msg)
|
||||
local fightData = BattleManager.GetBattleServerData(msg)
|
||||
if type==1 then --挑战
|
||||
if state==1 then --挑战
|
||||
UIManager.OpenPanel(UIName.BattlePanel, fightData, BATTLE_TYPE.DAILY_CHALLENGE , function(result)
|
||||
if result.result ==0 then
|
||||
elseif result.result==1 then
|
||||
|
@ -333,7 +420,7 @@ function this.SetData(root, data, ldata)
|
|||
end)
|
||||
end
|
||||
end)
|
||||
elseif type==2 then --扫荡
|
||||
elseif state==0 then --扫荡
|
||||
UIManager.OpenPanel(UIName.RewardItemPopup,msg.drop,1,function()
|
||||
PrivilegeManager.RefreshPrivilegeUsedTimes(data.PrivilegeId[2],1)
|
||||
this.RefreshShow(carbonIndex,false,false)
|
||||
|
@ -345,19 +432,24 @@ end
|
|||
|
||||
--设置剩余次数
|
||||
function this.SetTimeTip()
|
||||
LogError("curData[1].PrivilegeId[1]=="..curData[1].PrivilegeId[1])
|
||||
local storeData=ConfigManager.GetConfigDataByDoubleKey(ConfigName.StoreConfig,"StoreId",7,"Limit",curData[1].PrivilegeId[1])--商店表数据
|
||||
local buyTimeId= curData[1].PrivilegeId[1]
|
||||
local freeTimeId=curData[1].PrivilegeId[2]
|
||||
buyTime= ShopManager.GetShopItemRemainBuyTimes(SHOP_TYPE.FUNCTION_SHOP,storeData.Id) --购买次数
|
||||
LogError("buytimeid=="..buyTimeId.." freetimeid=="..freeTimeId)
|
||||
buyTime=ShopManager.GetShopItemRemainBuyTimes(SHOP_TYPE.FUNCTION_SHOP,storeData.Id) --购买次数
|
||||
maxBuyTime=ShopManager.GetShopItemLimitBuyCount(storeData.Id)
|
||||
freeTime=PrivilegeManager.GetPrivilegeRemainValue(freeTimeId) --免费次数
|
||||
maxFreeTime=PrivilegeManager.GetPrivilegeNumberById(freeTimeId)
|
||||
--LogGreen("buyTime "..buyTime.." freeTime "..freeTime)
|
||||
LogError("maxBuyTime=="..maxBuyTime.." maxFreeTime=="..maxFreeTime)
|
||||
local str=""
|
||||
if freeTime>0 then
|
||||
str=string.format(Language[12292],tostring(freeTime))
|
||||
else
|
||||
str=string.format(Language[10300],tostring(buyTime))
|
||||
end
|
||||
this.timeTip.text=str
|
||||
--this.timeTip.text=str
|
||||
end
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue