【神将觉醒】 觉醒成功界面

dev_chengFeng
zhangqiang 2020-11-07 15:15:49 +08:00
parent 1a4349d93b
commit 68979d577e
6 changed files with 59366 additions and 14 deletions

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 8e7c35c98345a4946b9b2a1d2f92a573
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -412,10 +412,10 @@ RectTransform:
m_Father: {fileID: 1785417770880004080}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 1}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 393.8, y: 118}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0, y: 0.5}
--- !u!222 &622859783849659190
CanvasRenderer:
@ -606,10 +606,10 @@ RectTransform:
m_Father: {fileID: 1785417770880004080}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 1}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 396.5, y: 28}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0, y: 0.5}
--- !u!222 &5548951530219399633
CanvasRenderer:
@ -725,7 +725,7 @@ RectTransform:
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: 0, y: 0}
m_AnchoredPosition: {x: 45.5, y: -14.5}
m_SizeDelta: {x: 160, y: 30}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &2213428538621384854
@ -803,10 +803,10 @@ RectTransform:
m_Father: {fileID: 8409576028944797162}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 33.4, y: -16.7}
m_SizeDelta: {x: 66.8, y: 33.4}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &3214724962663479711
CanvasRenderer:

View File

@ -0,0 +1,165 @@
require("Base/BasePanel")
RoleAwakeSuccessPanel = Inherit(BasePanel)
local this=RoleAwakeSuccessPanel
this.skillConfig=ConfigManager.GetConfig(ConfigName.SkillConfig)
local passiveSkillConfig=ConfigManager.GetConfig(ConfigName.PassiveSkillConfig)
local orginLayer = 20
local callBack = nil
local heroRankupConfig = ConfigManager.GetConfig(ConfigName.HeroRankupConfig)
local heroConfig = ConfigManager.GetConfig(ConfigName.HeroConfig)
--初始化组件(用于子类重写)
function RoleAwakeSuccessPanel:InitComponent()
orginLayer = 20
this.BtnBack = Util.GetGameObject(self.transform, "backBtn")
this.mask = Util.GetGameObject(self.transform, "mask")
this.live2dRoot=Util.GetGameObject(self.transform,"live2dRoot")
this.heroName = Util.GetGameObject(self.transform, "heroInfo/nameAndPossLayout/heroName"):GetComponent("Text")
this.profession = Util.GetGameObject(self.transform, "Pos/PosImage"):GetComponent("Image")
this.proImage = Util.GetGameObject(self.transform, "heroInfo/nameAndPossLayout/proImage/proImage"):GetComponent("Image")
this.starGrid = Util.GetGameObject(self.transform, "heroInfo/sartAndLvLayout")
this.posBgImage=Util.GetGameObject(self.transform,"Pos"):GetComponent("Image")
this.posText=Util.GetGameObject(self.transform,"Pos/PosText"):GetComponent("Text")
this.lvEndInfo=Util.GetGameObject(self.transform, "proInfo/lvEndText"):GetComponent("Text")
this.UI_Effect_choukaSSR = Util.GetGameObject(self.transform, "UI_Effect_chouka_SSR")
this.prefab = Util.GetGameObject(self.gameObject, "proInfo/pre")
this.ScrollParentView1 = Util.GetGameObject(self.gameObject, "proInfo/ScrollFitter")
this.ScrollView1 = SubUIManager.Open(SubUIConfig.ScrollFitterView, this.ScrollParentView1.transform,
this.prefab, Vector2.New(1017.6, 345.8), 1, 1)
end
--绑定事件(用于子类重写)
function RoleAwakeSuccessPanel:BindEvent()
Util.AddClick(this.BtnBack, function()
PlaySoundWithoutClick(SoundConfig.Sound_UICancel)
self:ClosePanel()
end)
end
--添加事件监听(用于子类重写)
function RoleAwakeSuccessPanel:AddListener()
end
--移除事件监听(用于子类重写)
function RoleAwakeSuccessPanel:RemoveListener()
end
function RoleAwakeSuccessPanel:OnSortingOrderChange()
Util.AddParticleSortLayer(this.UI_Effect_choukaSSR, self.sortingOrder - orginLayer)
this.mask:GetComponent("Canvas").overrideSorting = true
this.mask:GetComponent("Canvas").sortingOrder = self.sortingOrder - 30
orginLayer = self.sortingOrder
end
--界面打开时调用(用于子类重写)
function RoleAwakeSuccessPanel:OnOpen(_curHeroData,_nextHeroUpStarId,_curHeroRankUpConfigOpenLevel,_callBack)
local curHeroData=_curHeroData
local nextHeroUpStarId=_nextHeroUpStarId
local curHeroRankUpConfigOpenLevel=_curHeroRankUpConfigOpenLevel
callBack = _callBack
this.UI_Effect_choukaSSR:SetActive(true)
this.LiveName = GetResourcePath(curHeroData.heroConfig.Live)
this.LiveGO = poolManager:LoadLive(this.LiveName, this.live2dRoot.transform,
Vector3.one * curHeroData.heroConfig.Scale, Vector3.New(curHeroData.heroConfig.Position[1],curHeroData.heroConfig.Position[2],0))
SetHeroStars(this.starGrid, curHeroData.star+1,1,Vector2.New(60,60),-11,Vector2.New(0.5,0.5))
this.profession.sprite = Util.LoadSprite(GetHeroPosStr(curHeroData.heroConfig.Profession))
this.proImage.sprite =Util.LoadSprite(GetProStrImageByProNum(curHeroData.heroConfig.PropertyName))
this.heroName.text =curHeroData.heroConfig.ReadingName
this.posBgImage.sprite=Util.LoadSprite(GetHeroPosBgStr(curHeroData.heroConfig.Profession))
this.posText.text=curHeroData.heroConfig.HeroLocation
this.lvEndInfo.text=string.format(Language[11867],curHeroRankUpConfigOpenLevel)
local TalentData = this.GetNewTalentDataShow()
this.ScrollView1:SetData(TalentData, function(index, go)
this.SingOldTalentDataShow(go, TalentData[index])
end)
end
function this.GetNewTalentDataShow()
local breakSkillDataList = {}
local upStarSkillDataList = {}
if heroConfig.Awaken then
for i = 1, #heroConfig.Awaken do
local Desc = passiveSkillConfig[heroConfig.Awaken[i][3]].Desc
if heroConfig.Awaken[i][1] == 1 then--突破
local titleStr = NumToSimplenessFont[heroRankupConfig[heroConfig.Awaken[i][2]].Phase[2]] .. Language[11864]
local curBreakId = heroConfig.Awaken[i][2]
if breakSkillDataList[curBreakId] then
breakSkillDataList[curBreakId] = {index = curBreakId,type = 1,str = breakSkillDataList[curBreakId].str .. "  <color=#66FF00>"..Desc.."</color>"}
else
breakSkillDataList[curBreakId] = {index = curBreakId,type = 1,str ="<color=#66FF00>"..titleStr..Desc.."</color>"}
end
else--升星
local curUpStarId = heroConfig.Awaken[i][2]
local titleStr = NumToSimplenessFont[heroRankupConfig[curUpStarId].Phase[2]] .. Language[11865]
local _passiveSkillId = passiveSkillConfig[heroConfig.Awaken[i][3]].Id
if upStarSkillDataList[curUpStarId] then
upStarSkillDataList[curUpStarId] = {passiveSkillId = _passiveSkillId,type = 2,index = curUpStarId,str = upStarSkillDataList[curUpStarId].str .. "  <color=#66FF00>"..Desc.."</color>"}
else
upStarSkillDataList[curUpStarId] = {passiveSkillId = _passiveSkillId,type = 2,index = curUpStarId,str ="<color=#66FF00>"..titleStr..Desc.."</color>"}
end
end
end
end
local breakSkillDataList2 = {}
for i, v in pairs(breakSkillDataList) do
table.insert(breakSkillDataList2,v)
end
table.sort(breakSkillDataList2, function(a,b) return a.index<b.index end)
local upStarSkillDataList2 = {}
for i, v in pairs(upStarSkillDataList) do
table.insert(upStarSkillDataList2,v)
end
table.sort(upStarSkillDataList2, function(a,b) return a.index<b.index end)
for i = 1, #upStarSkillDataList2 do
table.insert(breakSkillDataList2,upStarSkillDataList2[i])
end
return breakSkillDataList2
end
function this.SingOldTalentDataShow(go,data)
local breakGo = Util.GetGameObject(go, "breakSkillTextPre")
local upStarGo = Util.GetGameObject(go, "upStarSkillTextPre")
if data.type == 1 then--突破
breakGo:SetActive(true)
upStarGo:SetActive(false)
breakGo:GetComponent("Text").text = data.str
else
breakGo:SetActive(false)
upStarGo:SetActive(true)
local kongStr = ""
if passiveSkillLogicConfig[data.passiveSkillId].Judge == 1 then
kongStr = "   "
else
kongStr = ""
end
Util.GetGameObject(upStarGo.transform, "Image"):SetActive(passiveSkillLogicConfig[data.passiveSkillId].Judge == 1)
upStarGo:GetComponent("Text").text = kongStr .. data.str
end
end
--界面关闭时调用(用于子类重写)
function RoleAwakeSuccessPanel:OnClose()
if this.LiveName then
poolManager:UnLoadLive(this.LiveName, this.LiveGO)
this.LiveName = nil
end
if callBack then
callBack()
callBack = nil
end
end
--界面销毁时调用(用于子类重写)
function RoleAwakeSuccessPanel:OnDestroy()
end
return RoleAwakeSuccessPanel

View File

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 8abe75a56e916ca4cad7e3c305129725
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -88,11 +88,10 @@ function this.GetOldTalentDataShow()
table.insert(upStarSkillDataList2,v)
end
table.sort(upStarSkillDataList2, function(a,b) return a.index<b.index end)
for i = 1, #upStarSkillDataList2 do
table.insert(breakSkillDataList2,upStarSkillDataList2[i])
end
return upStarSkillDataList2
return breakSkillDataList2
end
function this.GetNewTalentDataShow()
local breakSkillDataList = {}
@ -135,7 +134,7 @@ function this.GetNewTalentDataShow()
for i = 1, #upStarSkillDataList2 do
table.insert(breakSkillDataList2,upStarSkillDataList2[i])
end
return upStarSkillDataList2
return breakSkillDataList2
end
function this.SingOldTalentDataShow(go,data)
local breakGo = Util.GetGameObject(go, "breakSkillTextPre")