Merge branch 'china/dev' of http://60.1.1.230/gaoxin/JL_Client into china/dev

dev_chengFeng
jiaoyangna 2022-01-08 17:47:38 +08:00
commit 0281564bb3
18 changed files with 4171 additions and 281 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

View File

@ -0,0 +1,99 @@
fileFormatVersion: 2
guid: 96507c7d33a95834ab2e3cf8d31c85dd
TextureImporter:
fileIDToRecycleName: {}
externalObjects: {}
serializedVersion: 9
mipmaps:
mipMapMode: 0
enableMipMap: 0
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
isReadable: 0
streamingMipmaps: 0
streamingMipmapsPriority: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: 2
aniso: -1
mipBias: -100
wrapU: 1
wrapV: 1
wrapW: 1
nPOTScale: 0
lightmap: 0
compressionQuality: 50
spriteMode: 1
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 100
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1
alphaIsTransparency: 1
spriteTessellationDetail: -1
textureType: 8
textureShape: 1
singleChannelComponent: 0
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
platformSettings:
- serializedVersion: 2
buildTarget: Android
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: 65
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 1
androidETC2FallbackOverride: 0
- serializedVersion: 2
buildTarget: iPhone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: 56
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 1
androidETC2FallbackOverride: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID: c02fe6cb16feb0a4a8fc1aa9de52fb2f
vertices: []
indices:
edges: []
weights: []
spritePackingTag: FormationAtlas
pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.4 KiB

After

Width:  |  Height:  |  Size: 6.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.4 KiB

After

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.1 KiB

After

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.5 KiB

After

Width:  |  Height:  |  Size: 5.3 KiB

View File

@ -63302,17 +63302,17 @@ RectTransform:
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8903392646292273362}
m_LocalRotation: {x: -0, y: -0, z: 0.38268343, w: 0.92387956}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 100}
m_LocalScale: {x: 1.0002141, y: 1.0002141, z: 1.0002141}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 491038039515440220}
m_RootOrder: 4
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 45}
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: 60, y: -55.000015}
m_SizeDelta: {x: 60, y: 60}
m_SizeDelta: {x: 40, y: 40}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &4972066190102128193
CanvasRenderer:
@ -63335,14 +63335,14 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 0, b: 0, a: 1}
m_Color: {r: 1, g: 1, b: 1, 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: 21300000, guid: 3d49dff9e68d99042b98190141718524, type: 3}
m_Sprite: {fileID: 21300000, guid: 96507c7d33a95834ab2e3cf8d31c85dd, type: 3}
m_Type: 0
m_PreserveAspect: 0
m_FillCenter: 1

View File

@ -30752,19 +30752,6 @@ MonoBehaviour:
loop: 0
loopType: 0
targetObj: {fileID: 0}
- initV3: {x: 0, y: 0, z: 0}
initFloat: 0
isInit: 0
changeV3: {x: 0, y: 0, z: 0}
changeFloat: 1
duration: 0.2
delay: 0
curveType: 1
changeType: 8
sequeueType: 1
loop: 0
loopType: 0
targetObj: {fileID: 0}
- initV3: {x: 0.95, y: 0.95, z: 0.95}
initFloat: 0
isInit: 0

View File

@ -3830,7 +3830,7 @@ RectTransform:
- {fileID: 4322729524025985070}
- {fileID: 3371266415083751348}
m_Father: {fileID: 4324122628603852573}
m_RootOrder: 3
m_RootOrder: 4
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
@ -8165,8 +8165,8 @@ RectTransform:
- {fileID: 3157917383277554550}
- {fileID: 5998833855639941095}
- {fileID: 8624922088146301509}
- {fileID: 8801044181696536146}
- {fileID: 7047674656314394960}
- {fileID: 8801044181696536146}
m_Father: {fileID: 2688485128400521159}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
@ -15634,7 +15634,7 @@ RectTransform:
m_Children:
- {fileID: 8467694386051670500}
m_Father: {fileID: 4324122628603852573}
m_RootOrder: 4
m_RootOrder: 3
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 1, y: 0}
m_AnchorMax: {x: 1, y: 0}

View File

@ -84414,7 +84414,7 @@ GameObject:
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
m_IsActive: 0
--- !u!224 &3419202398703480616
RectTransform:
m_ObjectHideFlags: 0

View File

@ -359,8 +359,8 @@ function this.HeroItemAdapter(_go, _heroData)
local con = _showConfig[loopList[index]]
if con then
txt.text = con.text
txt.color = Color.New(con.color.r, con.color.g, con.color.b, 0)
highlight.color = Color.New(con.color.r, con.color.g, con.color.b, 0)
txt.color = Color.New(con.color.r, con.color.g, con.color.b, 0.5)
highlight.color = Color.New(con.color.r, con.color.g, con.color.b, 0.5)
end
end)
-- loopFadeText(txt, highlight:GetComponent("Image"), loopList, 0)

View File

@ -60,7 +60,7 @@ function this:OnShow(_parent,_args)
this.limitNum.text = data.dataSingle.Storage[1][2]
local v = ConfigManager.GetConfigData(ConfigName.PrivilegeTypeConfig,4022).Condition[1][2]/10000-1
local priValue = HomeLandManager.activePrivilege and string.format("<color=#00FF00>+%s</color>",math.ceil(data.dataSingle.Gain[2]*v)) or ""
this.harvestNum.text = string.format("%s %s/分钟",data.dataSingle.Gain[2],priValue)
this.harvestNum.text = string.format("%s %s/分钟",data.dataSingle.Gain[2],priValue)
this.harvestIcon.sprite = this.spLoader:LoadSprite(GetSpriteNameByItemId(data.dataSingle.Gain[1]))
end

View File

@ -138,8 +138,10 @@ end
function this.GetCurIndex()
for i = 1, 4 do
if this.EquipData[i].configData.Limit2 == EquipRankUp[this.levelProId].Level then
this.curEquip = i
return
if this.EquipData[i].configData.Cost and this.EquipData[i].configData.Cost[1][2] <= BagManager.GetTotalItemNum(this.EquipData[i].configData.Cost[1][1]) then
this.curEquip = i
return
end
end
end
end

View File

@ -20,23 +20,22 @@ local TypeUpdateFunc = {
curData.rewards[i].otherData.needItems = configData[j].NeedItems
curData.rewards[i].otherData.count = configData[j].Count
curData.rewards[i].otherData.composeType = configData[j].ComposeType
curData.rewards[i].otherData.Sort = configData[j].Sort
curData.rewards[i].otherData.IsShowItem = configData[j].IsShowItem == 1 and true or false
curData.rewards[i].otherData.selectId = 0
end
end
end
table.sort(dataList[ActivityTypeDef.YunYouShangRen].rewards,function (a,b)
if a.progress == 0 and b.progress > 0 then
if a.progress == 0 and b.progress > 0 then
return false
end
if a.progress > 0 and b.progress == 0 then
return true
end
return a.missionId < b.missionId
-- if a.progress == b.progress then
-- else
-- return a.progress > b.progress
-- end
if (a.progress == 0 and b.progress == 0) or (a.progress > 0 and b.progress > 0) then
return a.otherData.Sort < b.otherData.Sort
end
end)
end,
[ActivityTypeDef.ContinuityRecharge] = function ()

View File

@ -14,6 +14,7 @@ function TrialRewardPopup:InitComponent()
this.panel=Util.GetGameObject(this.gameObject,"Panel")
this.backBtn=Util.GetGameObject(this.panel,"BackBtn")
this.maskBtn=Util.GetGameObject(this.gameObject,"Mask")
this.title = Util.GetGameObject(this.panel,"Title"):GetComponent("Text")
this.scroll=Util.GetGameObject(this.panel,"Scroll")
pres[1]=Util.GetGameObject(this.panel,"Scroll/Pre")
@ -97,6 +98,10 @@ function this.RefreshPanel(isTop,isAni)
end,not isTop,not isAni)
end
this.title.text = "奖 励"
if curType == 5 then
this.title.text = "任 务"
end
end
--设置每条数据

View File

@ -3,6 +3,8 @@ local this = SacredTreeManager
local treeLevelConfig = ConfigManager.GetConfig(ConfigName.GodHoodTreeLevel)
local treeSetting = ConfigManager.GetConfig(ConfigName.GodHoodTreeSetting)
local jewerLevelUpConfig = ConfigManager.GetConfig(ConfigName.JewelRankupConfig)
local PropertyConfig = ConfigManager.GetConfig(ConfigName.PropertyConfig)
local ClientAttriData = ConfigManager.GetConfigData(ConfigName.GodHoodTreeSetting,0).PropertyUnlcokLevelForClient
function this.Initialize()
this.treeLevel = 0
@ -145,4 +147,40 @@ function this.CheckRedPoint()
end
end
--获取当前等级和下一级的数据
function this.GetAttriDetail(index)
local data = {}
local maxSacredLevel = ConfigManager.GetConfigDataByKey(ConfigName.JewelConfig,"GodHoodPool",index).GodHoodMaxlv
local level = this.treeLevel < maxSacredLevel and this.treeLevel or maxSacredLevel
local configData = ConfigManager.TryGetConfigDataByThreeKey(ConfigName.JewelRankupConfig,"Type",3,"Level",level,"PoolID",index)
local configNextData = ConfigManager.TryGetConfigDataByThreeKey(ConfigName.JewelRankupConfig,"Type",3,"Level",level+1,"PoolID",index)
if this.treeLevel >= maxSacredLevel then--如果当前神树等级超出魂灵宝所能达到的最大等级就取最大
configNextData = nil
end
-- LogRed("#configData.Property:"..tostring(#configData.Property))
for i = 1, #configData.Property do
data[i] = {}
local bool = MonsterCampManager.GetFourElementTotalWave() >= ClientAttriData[i][2]
local color1 = bool and "#F3D98F" or "#A0A0A0"--是否解锁了当前属性
local color2 = bool and "#00FF00" or "#A0A0A0"--是否解锁了当前属性
if PropertyConfig[configData.Property[i][1]].Style == 1 then
data[i].text1 = string.format("<color=%s>%s+%s</color>",color1,PropertyConfig[configData.Property[i][1]].Info,configData.Property[i][2])
elseif PropertyConfig[configData.Property[i][1]].Style == 2 then
data[i].text1 = string.format("<color=%s>%s+%s",color1,PropertyConfig[configData.Property[i][1]].Info,configData.Property[i][2]/100).."%</color>"
end
-- LogPink("configNextData:"..tostring(configNextData))
if configNextData then
if PropertyConfig[configNextData.Property[i][1]].Style == 1 then
data[i].text2 = string.format("<color=%s>+%s</color>",color2,configNextData.Property[i][2] - configData.Property[i][2])
elseif PropertyConfig[configNextData.Property[i][1]].Style == 2 then
data[i].text2 = string.format("<color=%s>+%s",color2,(configNextData.Property[i][2] - configData.Property[i][2])/100).."%</color>"
end
else
local color = not bool and "A0A0A0" or "F3D98F"
data[i].text2 = string.format("<color=#%s>已达上限</color>",color)
end
-- LogGreen(data[i].text1.." "..data[i].text2)
end
return data
end
return this

View File

@ -8,6 +8,22 @@ local orginLayer = 0
local curTreeLevel = 0
local length = 0
local t = 3 --用来区分长按和点击的临界值
local COLOR = {
[1] = "#529764FF",
[2] = "#6398c9FF",
[3] = "#9358bdFF",
[4] = "#fcb24eFF",
[5] = "#FF0000",
}
local Trans = {
[1] = 5,
[2] = 4,
[3] = 3,
[4] = 2,
[5] = 1,
}
function SacredTreePanel:InitComponent()
self.spLoader = SpriteLoader.New()
--button
@ -16,18 +32,44 @@ function SacredTreePanel:InitComponent()
self.helpBtn = Util.GetGameObject(self.transform, "helpBtn")
self.helpPos = self.helpBtn:GetComponent("RectTransform").localPosition
self.attriBtn = Util.GetGameObject(self.transform, "attriBtn")
self.upgradeBtn = Util.GetGameObject(self.transform, "upgradeBtn")
self.treeRed = Util.GetGameObject(self.transform, "upgradeBtn/redPoint")
--show
self.attriNum = Util.GetGameObject(self.attriBtn, "num"):GetComponent("Text")
self.treeLevel = Util.GetGameObject(self.transform, "bg/level"):GetComponent("Text")
self.needIcon = Util.GetGameObject(self.transform, "tips/Image"):GetComponent("Image")
self.needNum = Util.GetGameObject(self.transform, "tips/num"):GetComponent("Text")
self.upGrade = Util.GetGameObject(self.transform, "upgradeBtn/Text"):GetComponent("Text")
self.attriNum = Util.GetGameObject(self.transform, "attriBtn/num"):GetComponent("Text")
--btn
self.bottom = Util.GetGameObject(self.transform, "bottom")
self.upgradeBtn = Util.GetGameObject(self.bottom, "upgradeBtn")
self.treeRed = Util.GetGameObject(self.upgradeBtn, "redPoint")
self.upGrade = Util.GetGameObject(self.upgradeBtn, "Text"):GetComponent("Text")
--tips
self.tips = Util.GetGameObject(self.bottom, "tips")
self.needIcon = Util.GetGameObject(self.tips, "Image"):GetComponent("Image")
self.needNum = Util.GetGameObject(self.tips, "num"):GetComponent("Text")
--详细信息部分
self.attriDetail = Util.GetGameObject(self.transform, "attriDetail")
self.title = Util.GetGameObject(self.attriDetail, "Grid/Top/Title"):GetComponent("Text")
self.btnChange = Util.GetGameObject(self.attriDetail, "Grid/Top/btnChange")
self.attriGrid = Util.GetGameObject(self.attriDetail, "Grid/Attributions")
self.attriPre = Util.GetGameObject(self.attriGrid, "attriPre")
self.jtBtn = Util.GetGameObject(self.transform, "jtBtn")
self.jtImg = Util.GetGameObject(self.jtBtn, "Image")
self.attriList = {}
self.bool = true--箭头按钮
self.playAni = false--箭头按钮
self.selectMask = Util.GetGameObject(self.transform, "Mask")
self.selectGrid = Util.GetGameObject(self.selectMask, "selectGrid")
self.selectList = {}
for i = 1, 5 do
self.selectList[i] = {}
self.selectList[i].btn1 = Util.GetGameObject(self.selectMask, "selectGrid/Pre ("..i..")/Image")
self.selectList[i].btn2 = Util.GetGameObject(self.selectMask, "selectGrid/Pre ("..i..")/Text")
self.selectList[i].select = Util.GetGameObject(self.selectMask, "selectGrid/Pre ("..i..")/Select")
self.selectList[i].select:SetActive(false)
end
--特效加长按
self.UI_effect_RecruitPanel_particle = Util.GetGameObject(self.transform, "UI_effect_RecruitPanel_particle")
self.trigger = Util.GetEventTriggerListener(self.upgradeBtn)
self.OnPointerDo = function(go, data)
self:OnPointerDown1(go, data)
@ -93,20 +135,19 @@ function SacredTreePanel:Refresh(isSend)
end
-- 重新计算宝物评分
EquipTreasureManager.SetAllTreasureDirty()
SacredTreeManager.OnPowerChange(oldPower)
end
self.isShortPress = false
self.numCount = 0
self:RequestDonate(self.num)
self:RequestDonate(self.num)
else
self.num = self.num + 1
BagManager.HeroLvUpUpdateItemsNum(treeLevelConfig[curTreeLevel].LvupCost[1],treeLevelConfig[curTreeLevel].LvupCost[2])
BagManager.HeroLvUpUpdateItemsNum(treeLevelConfig[curTreeLevel].LvupCost[1],treeLevelConfig[curTreeLevel].LvupCost[2])
self.itemNum = BagManager.GetTotalItemNum(treeLevelConfig[curTreeLevel].LvupCost[1])
if curTreeLevel == 0 then
PopupTipPanel.ShowTip("成功解锁神树~")
end
SacredTreeManager.treeLevel = SacredTreeManager.treeLevel + 1
SacredTreeManager.treeLevel = SacredTreeManager.treeLevel + 1
curTreeLevel = curTreeLevel + 1
local oldPower = FormationManager.GetFormationPower(FormationTypeDef.FORMATION_NORMAL)
EquipTreasureManager.ChangeTreeLv()
@ -128,14 +169,13 @@ function SacredTreePanel:Refresh(isSend)
self.isPressed = false
self:Refresh(true)
return
end
end
end
end
function SacredTreePanel:RequestDonate(num)
NetManager.UpgradeGodTreeRequest(num,function ()
self.num = 0
NetManager.UpgradeGodTreeRequest(num,function ()
self.num = 0
self:OnShow()
end)
end
@ -150,25 +190,73 @@ function SacredTreePanel:BindEvent()
Util.AddClick(self.attriBtn, function()
UIManager.OpenPanel(UIName.GeneralBigPopup,GENERAL_POPUP_TYPE.ShenYingShuXing)
end)
-- Util.AddClick(self.upgradeBtn, function()
-- if curTreeLevel >= length then
-- PopupTipPanel.ShowTip("神树已达最大等级~")
-- else
-- local num = BagManager.GetTotalItemNum(treeLevelConfig[curTreeLevel].LvupCost[1])
-- if num < treeLevelConfig[curTreeLevel].LvupCost[2] then
-- PopupTipPanel.ShowTip(string.format("%s不足!",itemConfig[treeLevelConfig[curTreeLevel].LvupCost[1]].Name))
-- else
-- local oldPower = FormationManager.GetFormationPower(FormationTypeDef.FORMATION_NORMAL)
-- NetManager.UpgradeGodTreeRequest(function ()
-- if curTreeLevel == 0 then
-- PopupTipPanel.ShowTip("成功解锁神树~")
-- end
-- SacredTreeManager.OnPowerChange(oldPower)
-- SacredTreePanel:OnShow()
-- end)
-- end
-- end
-- end)
Util.AddClick(self.jtBtn, function()
self.bool = not self.bool
self:ResetDetailPos()
end)
Util.AddClick(self.btnChange, function()
local length = self.bool and SacredTreeManager.CulAttri()*50 - 700 or #attriConfig.PropertyUnlcokLevels*50 - 700
if SacredTreeManager.CulAttri() == 0 then
length = #attriConfig.PropertyUnlcokLevels*50 - 700
end
self.selectGrid:GetComponent("RectTransform").localPosition = Vector3.New(0,length,0)
self.selectMask:SetActive(true)
PlayUIAnim(self.selectGrid)
end)
for i = 1, 5 do
Util.AddClick(self.selectList[i].btn1, function()
-- LogRed(self.selectIndex.." "..i)
if Trans[i] == self.selectIndex then
return
end
for j = 1, 5 do
self.selectList[j].select:SetActive(false)
end
self.selectList[i].select:SetActive(true)
self.selectIndex = Trans[i]
PlayerPrefs.SetInt(PlayerManager.uid.."SacredQualitySelect",Trans[i])
self.selectMask:SetActive(false)
for index, value in ipairs(self.attriList) do
value.transform:DORotate(Vector3.New(90,0,0),0.3):OnComplete(function ()
self.playAni = true
self:SetAttriDetail()
end)
end
end)
Util.AddClick(self.selectList[i].btn2, function()
-- LogRed(self.selectIndex.." "..i)
if Trans[i] == self.selectIndex then
return
end
for j = 1, 5 do
self.selectList[j].select:SetActive(false)
end
self.selectList[i].select:SetActive(true)
self.selectIndex = Trans[i]
PlayerPrefs.SetInt(PlayerManager.uid.."SacredQualitySelect",Trans[i])
self.selectMask:SetActive(false)
for index, value in ipairs(self.attriList) do
value.transform:DORotate(Vector3.New(90,0,0),0.3):OnComplete(function ()
self.playAni = true
self:SetAttriDetail()
end)
end
end)
end
Util.AddClick(self.selectMask, function()
self.selectMask:SetActive(false)
if PlayerPrefs.GetInt(PlayerManager.uid.."SacredQualitySelect") == self.selectIndex then
return
end
for index, value in ipairs(self.attriList) do
value.transform:DORotate(Vector3.New(90,0,0),0.3):OnComplete(function ()
self.playAni = true
self:SetAttriDetail()
end)
end
end)
BindRedPointObject(RedPointType.Sacred,self.treeRed)
FixedUpdateBeat:Add(self.OnUpdate, self)--长按方法注册
end
@ -190,9 +278,14 @@ end
function SacredTreePanel:OnOpen()
self.UpView:OnOpen({ showType = UpViewOpenType.ShowLeft, panelType = PanelType.SacredTree})
if PlayerPrefs.GetInt(PlayerManager.uid.."SacredQualitySelect") == 0 then
PlayerPrefs.SetInt(PlayerManager.uid.."SacredQualitySelect",5)
end
self.selectIndex = PlayerPrefs.GetInt(PlayerManager.uid.."SacredQualitySelect")
end
function SacredTreePanel:OnShow()
Util.SetParticleSortLayer(self.UI_effect_RecruitPanel_particle, self.sortingOrder + 1)
self.playAni = false
CheckRedPointStatus(RedPointType.Sacred)
self.treeRed:SetActive(SacredTreeManager.CheckRedPoint())
curTreeLevel = SacredTreeManager.treeLevel
@ -227,6 +320,61 @@ function SacredTreePanel:OnShow()
self.needNum.gameObject:SetActive(curTreeLevel < length)
end
self.attriNum.text = SacredTreeManager.CulAttri().."/"..#attriConfig.PropertyUnlcokLevels
--设置中间属性
self:SetAttriDetail()
end
function SacredTreePanel:SetAttriDetail()
local curSelectIndex = self.selectIndex
if curTreeLevel <= 0 then
self.attriDetail:SetActive(false)
self.selectMask:SetActive(false)
self.jtBtn:SetActive(false)
else
self.attriDetail:SetActive(true)
self.selectMask:SetActive(true)
self.jtBtn:SetActive(SacredTreeManager.CulAttri() > 0 and SacredTreeManager.CulAttri() < #attriConfig.PropertyUnlcokLevels )
-- self.title.text = GetStringByEquipQua(curSelectIndex+1,QualityNameDef[curSelectIndex+1].."宝物神应属性")
self.title.text = string.format("<color=%s>%s宝物神应属性</color>",COLOR[curSelectIndex],QualityNameDef[curSelectIndex+1])
local data = SacredTreeManager.GetAttriDetail(curSelectIndex)
for index, value in ipairs(data) do
local go = self.attriList[index]
if not go then
go = newObjToParent(self.attriPre,self.attriGrid.transform)
self.attriList[index] = go
go:SetActive(true)
end
if self.playAni then
PlayUIAnim(go)
else
go.transform.rotation=Vector3.New(0,0,0)
end
Util.GetGameObject(go,"curAttri"):GetComponent("Text").text = value.text1
Util.GetGameObject(go,"nextAttri"):GetComponent("Text").text = value.text2
end
self:InitDetailPos()
end
end
function SacredTreePanel:InitDetailPos()
self.selectMask:SetActive(false)
self.selectList[Trans[self.selectIndex]].select:SetActive(true)
local rotation = self.bool and Vector3.zero or Vector3.New(179,0,0)
local length = self.bool and 170 + SacredTreeManager.CulAttri()*50 or 170 + #attriConfig.PropertyUnlcokLevels*50
if SacredTreeManager.CulAttri() == 0 then
length = 170 + #attriConfig.PropertyUnlcokLevels*50
end
self.jtImg:GetComponent("RectTransform").rotation = Quaternion.Euler(rotation)
self.attriDetail:GetComponent("RectTransform").sizeDelta = Vector3(0,length,0)
end
function SacredTreePanel:ResetDetailPos()
local length = self.bool and 170 + SacredTreeManager.CulAttri()*50 or 170 + #attriConfig.PropertyUnlcokLevels*50
local size = Vector2.New(1080,length)
local rotation = self.bool and 0 or 179
self.attriDetail.transform:DOSizeDelta(size, 0.8)
self.jtImg.transform:DORotateQuaternion(Quaternion.Euler(Vector3.New(rotation,0,0)),0.8)
end
function SacredTreePanel:OnClose()
@ -234,10 +382,11 @@ function SacredTreePanel:OnClose()
-- body
end
function SacredTreePanel:OnDestroy()
self.attriList = {}
FixedUpdateBeat:Remove(self.OnUpdate, self)
SubUIManager.Close(self.UpView)
self.spLoader:Destroy()
ClearRedPointObject(RedPointType.Sacred,self.treeRed)
ClearRedPointObject(RedPointType.Sacred,self.treeRed)
end
return SacredTreePanel