【建木神树】提交

dev_chengFeng
ZhangBiao 2022-01-08 10:33:31 +08:00
parent 314cc59bbc
commit 94cf5e4aec
4 changed files with 25 additions and 5 deletions

View File

@ -3774,7 +3774,7 @@ RectTransform:
m_GameObject: {fileID: 6410080023988175308}
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_LocalScale: {x: 0.8, y: 0.8, z: 0.8}
m_Children: []
m_Father: {fileID: 5046245018554704047}
m_RootOrder: 0

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

@ -171,9 +171,9 @@ function this.GetAttriDetail(index)
-- 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])
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]/100).."%</color>"
data[i].text2 = string.format("<color=%s>+%s",color2,(configNextData.Property[i][2] - configData.Property[i][2])/100).."%</color>"
end
else
data[i].text2 = "<color=#F3D98F>已达上限</color>"

View File

@ -59,7 +59,6 @@ function SacredTreePanel:InitComponent()
self.attriList = {}
self.bool = true--箭头按钮
self.playAni = false--箭头按钮
self.selectIndex = 5
self.selectMask = Util.GetGameObject(self.transform, "Mask")
self.selectGrid = Util.GetGameObject(self.selectMask, "selectGrid")
self.selectList = {}
@ -200,6 +199,9 @@ function SacredTreePanel:BindEvent()
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)
@ -211,6 +213,7 @@ function SacredTreePanel:BindEvent()
end
self.selectList[i].select:SetActive(true)
self.selectIndex = Trans[i]
PlayerPrefs.SetInt(PlayerManager.uid.."SacredQualitySelect",Trans[i])
end)
Util.AddClick(self.selectList[i].btn2, function()
for j = 1, 5 do
@ -218,6 +221,7 @@ function SacredTreePanel:BindEvent()
end
self.selectList[i].select:SetActive(true)
self.selectIndex = Trans[i]
PlayerPrefs.SetInt(PlayerManager.uid.."SacredQualitySelect",Trans[i])
end)
end
Util.AddClick(self.selectMask, function()
@ -255,6 +259,11 @@ end
function SacredTreePanel:OnOpen()
self.UpView:OnOpen({ showType = UpViewOpenType.ShowLeft, panelType = PanelType.SacredTree})
LogRed("Uid:"..tostring(PlayerPrefs.GetInt(PlayerManager.uid.."SacredQualitySelect")))
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)
@ -302,8 +311,12 @@ 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)
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
@ -330,6 +343,9 @@ function SacredTreePanel:InitDetailPos()
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
@ -347,7 +363,6 @@ function SacredTreePanel:OnClose()
-- body
end
function SacredTreePanel:OnDestroy()
self.selectIndex = 5
self.attriList = {}
FixedUpdateBeat:Remove(self.OnUpdate, self)
SubUIManager.Close(self.UpView)