【建木神树】提交
parent
314cc59bbc
commit
94cf5e4aec
|
@ -3774,7 +3774,7 @@ RectTransform:
|
||||||
m_GameObject: {fileID: 6410080023988175308}
|
m_GameObject: {fileID: 6410080023988175308}
|
||||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
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_Children: []
|
||||||
m_Father: {fileID: 5046245018554704047}
|
m_Father: {fileID: 5046245018554704047}
|
||||||
m_RootOrder: 0
|
m_RootOrder: 0
|
||||||
|
|
|
@ -14,6 +14,7 @@ function TrialRewardPopup:InitComponent()
|
||||||
this.panel=Util.GetGameObject(this.gameObject,"Panel")
|
this.panel=Util.GetGameObject(this.gameObject,"Panel")
|
||||||
this.backBtn=Util.GetGameObject(this.panel,"BackBtn")
|
this.backBtn=Util.GetGameObject(this.panel,"BackBtn")
|
||||||
this.maskBtn=Util.GetGameObject(this.gameObject,"Mask")
|
this.maskBtn=Util.GetGameObject(this.gameObject,"Mask")
|
||||||
|
this.title = Util.GetGameObject(this.panel,"Title"):GetComponent("Text")
|
||||||
|
|
||||||
this.scroll=Util.GetGameObject(this.panel,"Scroll")
|
this.scroll=Util.GetGameObject(this.panel,"Scroll")
|
||||||
pres[1]=Util.GetGameObject(this.panel,"Scroll/Pre")
|
pres[1]=Util.GetGameObject(this.panel,"Scroll/Pre")
|
||||||
|
@ -97,6 +98,10 @@ function this.RefreshPanel(isTop,isAni)
|
||||||
end,not isTop,not isAni)
|
end,not isTop,not isAni)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
this.title.text = "奖 励"
|
||||||
|
if curType == 5 then
|
||||||
|
this.title.text = "任 务"
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
--设置每条数据
|
--设置每条数据
|
||||||
|
|
|
@ -171,9 +171,9 @@ function this.GetAttriDetail(index)
|
||||||
-- LogPink("configNextData:"..tostring(configNextData))
|
-- LogPink("configNextData:"..tostring(configNextData))
|
||||||
if configNextData then
|
if configNextData then
|
||||||
if PropertyConfig[configNextData.Property[i][1]].Style == 1 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
|
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
|
end
|
||||||
else
|
else
|
||||||
data[i].text2 = "<color=#F3D98F>已达上限</color>"
|
data[i].text2 = "<color=#F3D98F>已达上限</color>"
|
||||||
|
|
|
@ -59,7 +59,6 @@ function SacredTreePanel:InitComponent()
|
||||||
self.attriList = {}
|
self.attriList = {}
|
||||||
self.bool = true--箭头按钮
|
self.bool = true--箭头按钮
|
||||||
self.playAni = false--箭头按钮
|
self.playAni = false--箭头按钮
|
||||||
self.selectIndex = 5
|
|
||||||
self.selectMask = Util.GetGameObject(self.transform, "Mask")
|
self.selectMask = Util.GetGameObject(self.transform, "Mask")
|
||||||
self.selectGrid = Util.GetGameObject(self.selectMask, "selectGrid")
|
self.selectGrid = Util.GetGameObject(self.selectMask, "selectGrid")
|
||||||
self.selectList = {}
|
self.selectList = {}
|
||||||
|
@ -200,6 +199,9 @@ function SacredTreePanel:BindEvent()
|
||||||
|
|
||||||
Util.AddClick(self.btnChange, function()
|
Util.AddClick(self.btnChange, function()
|
||||||
local length = self.bool and SacredTreeManager.CulAttri()*50 - 700 or #attriConfig.PropertyUnlcokLevels*50 - 700
|
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.selectGrid:GetComponent("RectTransform").localPosition = Vector3.New(0,length,0)
|
||||||
self.selectMask:SetActive(true)
|
self.selectMask:SetActive(true)
|
||||||
PlayUIAnim(self.selectGrid)
|
PlayUIAnim(self.selectGrid)
|
||||||
|
@ -211,6 +213,7 @@ function SacredTreePanel:BindEvent()
|
||||||
end
|
end
|
||||||
self.selectList[i].select:SetActive(true)
|
self.selectList[i].select:SetActive(true)
|
||||||
self.selectIndex = Trans[i]
|
self.selectIndex = Trans[i]
|
||||||
|
PlayerPrefs.SetInt(PlayerManager.uid.."SacredQualitySelect",Trans[i])
|
||||||
end)
|
end)
|
||||||
Util.AddClick(self.selectList[i].btn2, function()
|
Util.AddClick(self.selectList[i].btn2, function()
|
||||||
for j = 1, 5 do
|
for j = 1, 5 do
|
||||||
|
@ -218,6 +221,7 @@ function SacredTreePanel:BindEvent()
|
||||||
end
|
end
|
||||||
self.selectList[i].select:SetActive(true)
|
self.selectList[i].select:SetActive(true)
|
||||||
self.selectIndex = Trans[i]
|
self.selectIndex = Trans[i]
|
||||||
|
PlayerPrefs.SetInt(PlayerManager.uid.."SacredQualitySelect",Trans[i])
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
Util.AddClick(self.selectMask, function()
|
Util.AddClick(self.selectMask, function()
|
||||||
|
@ -255,6 +259,11 @@ end
|
||||||
|
|
||||||
function SacredTreePanel:OnOpen()
|
function SacredTreePanel:OnOpen()
|
||||||
self.UpView:OnOpen({ showType = UpViewOpenType.ShowLeft, panelType = PanelType.SacredTree})
|
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
|
end
|
||||||
function SacredTreePanel:OnShow()
|
function SacredTreePanel:OnShow()
|
||||||
Util.SetParticleSortLayer(self.UI_effect_RecruitPanel_particle, self.sortingOrder + 1)
|
Util.SetParticleSortLayer(self.UI_effect_RecruitPanel_particle, self.sortingOrder + 1)
|
||||||
|
@ -302,8 +311,12 @@ function SacredTreePanel:SetAttriDetail()
|
||||||
local curSelectIndex = self.selectIndex
|
local curSelectIndex = self.selectIndex
|
||||||
if curTreeLevel <= 0 then
|
if curTreeLevel <= 0 then
|
||||||
self.attriDetail:SetActive(false)
|
self.attriDetail:SetActive(false)
|
||||||
|
self.selectMask:SetActive(false)
|
||||||
|
self.jtBtn:SetActive(false)
|
||||||
else
|
else
|
||||||
self.attriDetail:SetActive(true)
|
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])
|
self.title.text = string.format("<color=%s>%s宝物神应属性</color>",COLOR[curSelectIndex],QualityNameDef[curSelectIndex+1])
|
||||||
local data = SacredTreeManager.GetAttriDetail(curSelectIndex)
|
local data = SacredTreeManager.GetAttriDetail(curSelectIndex)
|
||||||
for index, value in ipairs(data) do
|
for index, value in ipairs(data) do
|
||||||
|
@ -330,6 +343,9 @@ function SacredTreePanel:InitDetailPos()
|
||||||
self.selectList[Trans[self.selectIndex]].select:SetActive(true)
|
self.selectList[Trans[self.selectIndex]].select:SetActive(true)
|
||||||
local rotation = self.bool and Vector3.zero or Vector3.New(179,0,0)
|
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
|
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.jtImg:GetComponent("RectTransform").rotation = Quaternion.Euler(rotation)
|
||||||
self.attriDetail:GetComponent("RectTransform").sizeDelta = Vector3(0,length,0)
|
self.attriDetail:GetComponent("RectTransform").sizeDelta = Vector3(0,length,0)
|
||||||
end
|
end
|
||||||
|
@ -347,7 +363,6 @@ function SacredTreePanel:OnClose()
|
||||||
-- body
|
-- body
|
||||||
end
|
end
|
||||||
function SacredTreePanel:OnDestroy()
|
function SacredTreePanel:OnDestroy()
|
||||||
self.selectIndex = 5
|
|
||||||
self.attriList = {}
|
self.attriList = {}
|
||||||
FixedUpdateBeat:Remove(self.OnUpdate, self)
|
FixedUpdateBeat:Remove(self.OnUpdate, self)
|
||||||
SubUIManager.Close(self.UpView)
|
SubUIManager.Close(self.UpView)
|
||||||
|
|
Loading…
Reference in New Issue