神将置换入口添加

dev_chengFeng
ZhangBiao 2020-08-05 16:30:02 +08:00
parent ee19d26bd3
commit 203514d85f
11 changed files with 91 additions and 25 deletions

View File

@ -4555,7 +4555,7 @@ RectTransform:
m_GameObject: {fileID: 1961921459115299796}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 0.00375, y: 0.00375, z: 0.00375}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children:
- {fileID: 1053210000696434690}
m_Father: {fileID: 4492008349822918777}
@ -4961,7 +4961,7 @@ GameObject:
- component: {fileID: 1067434188467956598}
- component: {fileID: 5317740808849015281}
m_Layer: 5
m_Name: ComponudHeroPanel
m_Name: CompoundHeroPanel
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0

View File

@ -33376,7 +33376,7 @@ MonoBehaviour:
extension: .prefab
resPathIndex: 168
resAbNameIndex: 1561
- resName: ComponudHeroPanel
- resName: CompoundHeroPanel
extension: .prefab
resPathIndex: 169
resAbNameIndex: 1561

View File

@ -325,7 +325,7 @@ UIName = {
TopMatchPlayBattleAinSelectPopup = 324,--巅峰战淘汰赛赛程记录回放
ArenaTopMatchGuessTipViewPopup = 325,--巅峰赛竞猜结果弹窗
DynamicActivityPanel = 326,--轮转活动通用窗口
CompounHeroPanel = 327,--神将置换、合成界面
CompoundHeroPanel = 327,--神将置换、合成界面
}

View File

@ -3,18 +3,18 @@ CompoundHeroPanel = Inherit(BasePanel)
local this = CompoundHeroPanel
local TabBox = require("Modules/Common/TabBox")
local _TabData={ [1] = { default = "r_hero_xuanze_002", select = "r_hero_xuanze_001", name = "神将置换" },
-- [2] = { default = "r_hero_xuanze_002", select = "r_hero_xuanze_001", name = "神将合成" },
[2] = { default = "r_hero_xuanze_002", select = "r_hero_xuanze_001", name = "神将合成" },
}
local _TabFontColor = { default = Color.New(130 / 255, 128 / 255, 120 / 255, 1),
select = Color.New(243 / 255, 235 / 255, 202 / 255, 1)}
local curIndex = 1
this.contents = {
[1] = {view = require("Modules/CompoundHero/view/CompoundPanel_Replace"), panelName = "CompoundPanel_Replace"},
-- [2] = {view = require("Modules/CompoundHero/view/CompoundPanel_Compound"), panelName = "CompoundPanel_Compound"},
[1] = {view = require("Modules/CompoundHero/view/CompoundHero_Replace"), panelName = "CompoundHero_Replace"},
[2] = {view = require("Modules/CompoundHero/view/CompoundHero_Compound"), panelName = "CompoundHero_Compound"},
}
--初始化组件(用于子类重写)
function CompoundPanel:InitComponent()
function CompoundHeroPanel:InitComponent()
this.HelpBtn = Util.GetGameObject(self.gameObject,"helpBtn")
this.helpPosition=this.HelpBtn:GetComponent("RectTransform").localPosition
@ -32,7 +32,7 @@ function CompoundPanel:InitComponent()
end
--绑定事件(用于子类重写)
function CompoundPanel:BindEvent()
function CompoundHeroPanel:BindEvent()
Util.AddClick(this.btnBack, function()
self:ClosePanel()
end)
@ -41,7 +41,7 @@ function CompoundPanel:BindEvent()
end
end
function CompoundPanel.RefreshHelpBtn()
function CompoundHeroPanel.RefreshHelpBtn()
if curIndex==1 then
this.HelpBtn:SetActive(true)
Util.AddOnceClick(this.HelpBtn, function()
@ -63,32 +63,32 @@ function CompoundPanel.RefreshHelpBtn()
end
--添加事件监听(用于子类重写)
function CompoundPanel:AddListener()
function CompoundHeroPanel:AddListener()
for i = 1, #this.contents do
this.contents[i].view:AddListener()
end
end
--移除事件监听(用于子类重写)
function CompoundPanel:RemoveListener()
function CompoundHeroPanel:RemoveListener()
for i = 1, #this.contents do
this.contents[i].view:RemoveListener()
end
end
--界面打开时调用(用于子类重写)
function CompoundPanel:OnOpen(_curIndex)
function CompoundHeroPanel:OnOpen(_curIndex)
curIndex = _curIndex and _curIndex or 1
end
--界面打开或者重新打开后,界面刷新时调用(用于子类重写)
function CompoundPanel:OnShow()
function CompoundHeroPanel:OnShow()
this.TabCtrl = TabBox.New()
this.TabCtrl:SetTabAdapter(this.TabAdapter)
this.TabCtrl:SetChangeTabCallBack(this.SwitchView)
this.TabCtrl:Init(this.tabBox, _TabData, curIndex)
end
function CompoundPanel:OnSortingOrderChange()
function CompoundHeroPanel:OnSortingOrderChange()
this.sortingOrder = self.sortingOrder
for i = 1, #this.contents do
this.contents[i].view:OnSortingOrderChange(self.sortingOrder)
@ -132,18 +132,18 @@ function this.UpdateCompoundPanel_SoulPrint(equipSign,index)
end
--界面关闭时调用(用于子类重写)
function CompoundPanel:OnClose()
function CompoundHeroPanel:OnClose()
for i = 1, #this.contents do
this.contents[i].view:OnClose()
end
end
--界面销毁时调用(用于子类重写)
function CompoundPanel:OnDestroy()
function CompoundHeroPanel:OnDestroy()
SubUIManager.Close(this.upView)
for i = 1, #this.contents do
this.contents[i].view:OnDestroy()
end
end
return CompoundPanel
return CompoundHeroPanel

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 11b077b4b791771468639d6a639ef33c
guid: 545609cd2a45adf46bbd9a0b590f7a4f
DefaultImporter:
externalObjects: {}
userData:

View File

@ -0,0 +1,33 @@
----- 神将合成 -----
local this = {}
local sortingOrder=0
function this:InitComponent(gameObject)
end
function this:BindEvent()
end
function this:AddListener()
end
function this:RemoveListener()
end
function this:OnSortingOrderChange(_sortingOrder)
sortingOrder = _sortingOrder
end
function this:OnShow(...)
end
function this:OnClose()
end
function this:OnDestroy()
end
return this

View File

@ -0,0 +1,33 @@
----- 神将置换 -----
local this = {}
local sortingOrder=0
function this:InitComponent(gameObject)
end
function this:BindEvent()
end
function this:AddListener()
end
function this:RemoveListener()
end
function this:OnSortingOrderChange(_sortingOrder)
sortingOrder = _sortingOrder
end
function this:OnShow(...)
end
function this:OnClose()
end
function this:OnDestroy()
end
return this

View File

@ -219,7 +219,7 @@ function this:InitComponent()
this.btnWaiDi = Util.GetGameObject(this.gameObject, "scene/layer4/btnWaiDi")
this.btnColorfulWorld = Util.GetGameObject(this.gameObject, "scene/layer6/btnColorfulWorld")
this.btnWaiDi:SetActive(false)
this.btnCompounHero = Util.GetGameObject(this.gameObject, "scene/layer4/btnCompounHero")
this.btnCompoundHero = Util.GetGameObject(this.gameObject, "scene/layer4/btnCompoundHero")
this.operateIcon = {
[FUNCTION_OPEN_TYPE.SHOP] = this:AddFuncItem(this.btnShangdian, 50),
@ -238,7 +238,7 @@ function this:InitComponent()
-- [FUNCTION_OPEN_TYPE.TALENT_TREE] = this:AddFuncItem(this.btnTianFu, -1179),
-- [FUNCTION_OPEN_TYPE.DIFFER_DEMONS] = this:AddFuncItem(this.btnYiYao, 0),
-- [FUNCTION_OPEN_TYPE.FIGHT_ALIEN] = this:AddFuncItem(this.btnWaiDi, 0),
[FUNCTION_OPEN_TYPE.COMPOUND_HERO] = this:AddFuncItem(this.btnCompounHero, 0),--神将合成、置换
[FUNCTION_OPEN_TYPE.COMPOUND_HERO] = this:AddFuncItem(this.btnCompoundHero, 0),--神将合成、置换
}
this.operateNewText = {
@ -258,7 +258,7 @@ function this:InitComponent()
-- [FUNCTION_OPEN_TYPE.TALENT_TREE] = this:InsertNewText(this.btnTianFu),
-- [FUNCTION_OPEN_TYPE.DIFFER_DEMONS] = this:InsertNewText(this.btnYiYao),
-- [FUNCTION_OPEN_TYPE.FIGHT_ALIEN] = this:InsertNewText(this.btnWaiDi),
[FUNCTION_OPEN_TYPE.COMPOUND_HERO] = this:InsertNewText(this.btnCompounHero),--神将合成、置换
[FUNCTION_OPEN_TYPE.COMPOUND_HERO] = this:InsertNewText(this.btnCompoundHero),--神将合成、置换
}
-- 红点
@ -282,7 +282,7 @@ function this:InitComponent()
--this.rpGuanxing = Util.GetGameObject(this.btnGuanxing, "redPoint")
this.rpAlien = Util.GetGameObject(this.btnWaiDi, "redPoint")
this.rpColorfulWorld = Util.GetGameObject(this.btnColorfulWorld, "redPoint")
this.rpCompoundHero = Util.GetGameObject(this.btnCompounHero, "redPoint")--神将合成、置换
this.rpCompoundHero = Util.GetGameObject(this.btnCompoundHero, "redPoint")--神将合成、置换
@ -788,14 +788,14 @@ function this:BindEvent()
end)
--神将合成、神将置换
Util.AddClick(this.btnCompounHero, function()
Util.AddClick(this.btnCompoundHero, function()
-- if ActTimeCtrlManager.SingleFuncState(FUNCTION_OPEN_TYPE.COMPOUND_HERO) then
-- JumpManager.GoJump(74)
-- this.ScenceBtnClick(FUNCTION_OPEN_TYPE.COMPOUND_HERO)
-- else
-- PopupTipPanel.ShowTip(ActTimeCtrlManager.GetFuncTip(FUNCTION_OPEN_TYPE.COMPOUND_HERO))
-- end
UIManager.OpenPanel(UIName.CompounHeroPanel)--开发用,之后删除 释放上面
UIManager.OpenPanel(UIName.CompoundHeroPanel)--开发用,之后删除 释放上面
end)
this.BindRedPoint()

Binary file not shown.