Update - 1.13.0.124
EN: 1.13.0.124 CN: 1.13.0.124 JP: 1.13.0.128 KR: 1.13.0.130
This commit is contained in:
@@ -1,10 +1,12 @@
|
||||
local ConfigData = require("GameCore.Data.ConfigData")
|
||||
local TimerManager = require("GameCore.Timer.TimerManager")
|
||||
local GameResourceLoader = require("Game.Common.Resource.GameResourceLoader")
|
||||
local UIObjs = require("GameCore.UI.UIObjs")
|
||||
local ResType = GameResourceLoader.ResType
|
||||
local AdventureModuleHelper = CS.AdventureModuleHelper
|
||||
local BaseCtrl = class("BaseCtrl")
|
||||
local sRootPath = Settings.AB_ROOT_PATH
|
||||
local InUnityEditor = NovaAPI.IsEditorPlatform()
|
||||
local bDebugLog = false
|
||||
local typeof = typeof
|
||||
function BaseCtrl:ctor(goPrefabInstance, objPanel)
|
||||
@@ -14,6 +16,13 @@ function BaseCtrl:ctor(goPrefabInstance, objPanel)
|
||||
self._mapLoadAssets = {}
|
||||
self._mapHandler = {}
|
||||
self._mapNode = {}
|
||||
local csUIObjs = goPrefabInstance:GetComponent("UIObjsReference")
|
||||
if csUIObjs and not csUIObjs:IsNull() then
|
||||
self._uiObjs = UIObjs.new(csUIObjs, self)
|
||||
if not self._mapNodeConfig then
|
||||
self._mapNodeConfig = {}
|
||||
end
|
||||
end
|
||||
self:ParsePrefab(goPrefabInstance)
|
||||
if type(self.Awake) == "function" then
|
||||
self:Awake()
|
||||
@@ -102,16 +111,83 @@ function BaseCtrl:_Destroy()
|
||||
self._mapLoadAssets = nil
|
||||
self._mapHandler = nil
|
||||
self._mapNode = nil
|
||||
self._uiObjs = nil
|
||||
end
|
||||
function BaseCtrl:_Release()
|
||||
if self.gameObject ~= nil and self.gameObject:IsNull() == false and type(self.OnRelease) == "function" then
|
||||
self:OnRelease()
|
||||
end
|
||||
end
|
||||
function BaseCtrl:_FillMapNodeConfigByUIObjs(mapNodeConfig)
|
||||
if self._uiObjs == nil or type(mapNodeConfig) ~= "table" then
|
||||
return
|
||||
end
|
||||
local mapCoveredByCount = {}
|
||||
local tbInject = {}
|
||||
for sKey, mapConfig in pairs(mapNodeConfig) do
|
||||
local nCount = mapConfig.nCount
|
||||
if type(nCount) == "number" then
|
||||
local sNodeName = mapConfig.sNodeName or sKey
|
||||
if mapConfig.sNodeName == nil then
|
||||
mapConfig.sNodeName = sNodeName
|
||||
end
|
||||
local _, sTypeName = self._uiObjs:Get(sNodeName .. "1")
|
||||
if mapConfig.sComponentName == nil and mapConfig.sCtrlName == nil and sTypeName ~= nil then
|
||||
mapConfig.sComponentName = sTypeName
|
||||
end
|
||||
if mapConfig.sCtrlName ~= nil and type(mapConfig.callback) == "string" and sTypeName ~= nil then
|
||||
local sShadowKey = sKey .. "__BtnHandler"
|
||||
if mapNodeConfig[sShadowKey] == nil and tbInject[sShadowKey] == nil then
|
||||
tbInject[sShadowKey] = {
|
||||
nCount = nCount,
|
||||
sNodeName = sNodeName,
|
||||
sComponentName = sTypeName,
|
||||
callback = mapConfig.callback
|
||||
}
|
||||
end
|
||||
end
|
||||
for i = 1, nCount do
|
||||
mapCoveredByCount[sNodeName .. tostring(i)] = true
|
||||
end
|
||||
else
|
||||
local uiObj, sTypeName = self._uiObjs:Get(sKey)
|
||||
if uiObj ~= nil then
|
||||
if mapConfig.sNodeName == nil then
|
||||
mapConfig.sNodeName = sKey
|
||||
end
|
||||
if mapConfig.sComponentName == nil and mapConfig.sCtrlName == nil then
|
||||
mapConfig.sComponentName = sTypeName
|
||||
end
|
||||
if mapConfig.sCtrlName ~= nil and type(mapConfig.callback) == "string" then
|
||||
local sShadowKey = sKey .. "__BtnHandler"
|
||||
if mapNodeConfig[sShadowKey] == nil and tbInject[sShadowKey] == nil then
|
||||
tbInject[sShadowKey] = {
|
||||
sNodeName = mapConfig.sNodeName or sKey,
|
||||
sComponentName = sTypeName,
|
||||
callback = mapConfig.callback
|
||||
}
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
for sShadowKey, shadowConfig in pairs(tbInject) do
|
||||
mapNodeConfig[sShadowKey] = shadowConfig
|
||||
end
|
||||
for _, sKey in ipairs(self._uiObjs._keys) do
|
||||
if mapNodeConfig[sKey] == nil and not mapCoveredByCount[sKey] then
|
||||
local uiObj, sTypeName = self._uiObjs:Get(sKey)
|
||||
if uiObj ~= nil and sTypeName ~= nil then
|
||||
mapNodeConfig[sKey] = {sNodeName = sKey, sComponentName = sTypeName}
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
function BaseCtrl:_ParseNode(mapNodeConfig)
|
||||
if self.gameObject ~= nil and type(mapNodeConfig) == "table" then
|
||||
self:_FillMapNodeConfigByUIObjs(mapNodeConfig)
|
||||
local trPrefabRoot = self.gameObject.transform
|
||||
local mapNode = {}
|
||||
local mapNode
|
||||
local function func_MarkAllNode(trRoot)
|
||||
local nChildCount = trRoot.childCount - 1
|
||||
for i = 0, nChildCount do
|
||||
@@ -122,7 +198,20 @@ function BaseCtrl:_ParseNode(mapNodeConfig)
|
||||
end
|
||||
end
|
||||
end
|
||||
func_MarkAllNode(trPrefabRoot)
|
||||
local func_GetGoByName = function(sName)
|
||||
if self._uiObjs ~= nil then
|
||||
local uiObj = self._uiObjs[sName]
|
||||
if uiObj ~= nil then
|
||||
local uiType = self._uiObjs._objTypeMaps[sName]
|
||||
return uiType == "GameObject" and uiObj or uiObj.gameObject
|
||||
end
|
||||
end
|
||||
if mapNode == nil then
|
||||
mapNode = {}
|
||||
func_MarkAllNode(trPrefabRoot)
|
||||
end
|
||||
return mapNode[sName]
|
||||
end
|
||||
for sKey, mapConfig in pairs(mapNodeConfig) do
|
||||
local sNodeName = mapConfig.sNodeName
|
||||
local nCount = mapConfig.nCount
|
||||
@@ -146,7 +235,7 @@ function BaseCtrl:_ParseNode(mapNodeConfig)
|
||||
for nIndex, sName in ipairs(tbNodeName) do
|
||||
local bComponentFound = true
|
||||
local objNode
|
||||
local goNode = mapNode[sName]
|
||||
local goNode = func_GetGoByName(sName)
|
||||
if goNode ~= nil then
|
||||
if type(sCtrlName) == "string" then
|
||||
local objCtrl
|
||||
@@ -162,6 +251,10 @@ function BaseCtrl:_ParseNode(mapNodeConfig)
|
||||
objCtrl = luaClass.new(goNode, self._panel)
|
||||
objCtrl._nGoInstanceId = nGoInstanceId
|
||||
table.insert(self._panel._tbObjChildCtrl, objCtrl)
|
||||
if InUnityEditor and goNode and goNode.gameObject then
|
||||
local sPanelName = objCtrl._panel.__cname
|
||||
NovaAPI.AttachPrefabLuaInspector(goNode.gameObject, sCtrlName, sPanelName, nil)
|
||||
end
|
||||
end
|
||||
objCtrl:ParsePrefab(goNode)
|
||||
objNode = objCtrl
|
||||
@@ -704,11 +797,6 @@ function BaseCtrl:OnEvent_AvgSpeedUp_Timer(nRate)
|
||||
end
|
||||
end
|
||||
end
|
||||
function BaseCtrl:SetAvgCharHeadIconByPrefab(img, sPrefabPath)
|
||||
local sFullPath = sRootPath .. sPrefabPath
|
||||
local prefab = GameResourceLoader.LoadAsset(ResType.Any, sFullPath, typeof(GameObject), "UI", self._panel._nPanelId)
|
||||
NovaAPI.SetImageSpriteWithPrefab(img, prefab)
|
||||
end
|
||||
function BaseCtrl:AddTimer(nTargetCount, nInterval, sCallbackName, bAutoRun, bDestroyWhenComplete, nScaleType, tbParam)
|
||||
local callback
|
||||
if type(sCallbackName) == "function" then
|
||||
@@ -816,6 +904,10 @@ function BaseCtrl:BindCtrlByNode(goNode, sCtrlName)
|
||||
objCtrl = luaClass.new(goNode, self._panel)
|
||||
table.insert(self._panel._tbObjDyncChildCtrl, objCtrl)
|
||||
objCtrl:_Enter()
|
||||
if InUnityEditor and goNode and goNode.gameObject then
|
||||
local sPanelName = self._panel.__cname
|
||||
NovaAPI.AttachPrefabLuaInspector(goNode.gameObject, sCtrlName, sPanelName, nil)
|
||||
end
|
||||
end
|
||||
return objCtrl
|
||||
end
|
||||
|
||||
@@ -6,6 +6,7 @@ local sTopBarCtrlLua = "Game.UI.TopBarEx.TopBarCtrl"
|
||||
local sSafeAreaRoot = "----SafeAreaRoot----"
|
||||
local bDebugLog = false
|
||||
local typeof = typeof
|
||||
local InUnityEditor = NovaAPI.IsEditorPlatform()
|
||||
function BasePanel:ctor(nIndex, nPanelId, tbParam)
|
||||
self._nIndex = nIndex
|
||||
self._nPanelId = nPanelId
|
||||
@@ -114,7 +115,10 @@ function BasePanel:_PreEnter(callback, goSnapshot)
|
||||
rt.anchoredPosition = Vector2.zero
|
||||
end
|
||||
end
|
||||
NovaAPI.ProcResPathNote(goPrefabInstance, GameResourceLoader.MakeBundleGroup("UI", self._nPanelId))
|
||||
if InUnityEditor then
|
||||
local sPanelName = self.__cname
|
||||
NovaAPI.AttachPrefabLuaInspector(goPrefabInstance, sLuaClassName, sPanelName, sPrefabFullPath)
|
||||
end
|
||||
if objCtrl == nil then
|
||||
objCtrl = luaClassName.new(goPrefabInstance, self)
|
||||
table.insert(self._tbObjCtrl, objCtrl)
|
||||
|
||||
@@ -66,6 +66,7 @@ local PanelDefine = {
|
||||
[PanelId.ReceivePropsNPC] = "Game.UI.ReceivePropsEx.ReceivePropsNPCPanel",
|
||||
[PanelId.Friend] = "Game.UI.FriendEx.FriendPanel",
|
||||
[PanelId.FriendCarte] = "Game.UI.FriendEx.FriendCartePanel",
|
||||
[PanelId.FriendAddStranger] = "Game.UI.FriendEx.FriendAddStrangerPanel",
|
||||
[PanelId.RoguelikeLevel] = "Game.UI.FixedRoguelikeLevelSelectEx.FixedRoguelikeLevelSelectPanel",
|
||||
[PanelId.RogueBossLevel] = "Game.UI.FixedRoguelikeLevelSelectEx.RogueBossSelectPanel",
|
||||
[PanelId.WorldClassUpgrade] = "Game.UI.WorldClassEx.WorldClassUpgradePanel",
|
||||
@@ -91,6 +92,7 @@ local PanelDefine = {
|
||||
[PanelId.SkillSucBar] = "Game.UI.SuccessBarEx.SkillSucBarPanel",
|
||||
[PanelId.CharSucBar] = "Game.UI.SuccessBarEx.CharSucBarPanel",
|
||||
[PanelId.EquipmentSucBar] = "Game.UI.SuccessBarEx.EquipmentSucBarPanel",
|
||||
[PanelId.TraceHuntSucBar] = "Game.UI.SuccessBarEx.TraceHuntSucBarPanel",
|
||||
[PanelId.ReceiveAutoTrans] = "Game.UI.SuccessBarEx.ReceiveAutoTransPanel",
|
||||
[PanelId.CharacterSkinPanel] = "Game.UI.CharacterSkin.CharacterSkinPanel",
|
||||
[PanelId.ReceiveSpecialReward] = "Game.UI.CharacterSkin.ReceiveSpecialRewardPanel",
|
||||
@@ -104,7 +106,7 @@ local PanelDefine = {
|
||||
[PanelId.FRQuestComplete] = "Game.UI.FixedRoguelikeEx.FixedRoguelikeQuestCompletePanel",
|
||||
[PanelId.PopupSkillPanel] = "Game.UI.CommonTipsEx.PopupSkillPanel",
|
||||
[PanelId.TravelerDuelLevelQuestPanel] = "Game.UI.TravelerDuelLevelSelect.TravelerDuelQuest.TravelerDuelQuestPanel",
|
||||
[PanelId.TDBattleResultPanel] = "Game.UI.TrekkerVersus_600002.TDBattleResultPanel",
|
||||
[PanelId.TDBattleResultPanel] = "Game.UI.TrekkerVersus_600003.TDBattleResultPanel",
|
||||
[PanelId.TDLevelUpgrade] = "Game.UI.TravelerDuelLevelSelect.TDClassUpgradePanel",
|
||||
[PanelId.CharacterRelation] = "Game.UI.CharacterInfoEx.CharacterPlotPanel",
|
||||
[PanelId.ExChangePanel] = "Game.UI.ExChange.ExChangePanel",
|
||||
@@ -190,6 +192,8 @@ local PanelDefine = {
|
||||
[PanelId.CookieGamePanel_400006] = "Game.UI.Play_Cookie_400006.CookieGamePanel",
|
||||
[PanelId.CookieBoardPanel_400010] = "Game.UI.Play_Cookie.400010.CookieBoardPanel",
|
||||
[PanelId.CookieGamePanel_400010] = "Game.UI.Play_Cookie.400010.CookieGamePanel",
|
||||
[PanelId.CookieBoardPanel_400016] = "Game.UI.Play_Cookie.400016.CookieBoardPanel",
|
||||
[PanelId.CookieGamePanel_400016] = "Game.UI.Play_Cookie.400016.CookieGamePanel",
|
||||
[PanelId.LampNoticePanel] = "Game.UI.LampNotice.LampNoticePanel",
|
||||
[PanelId.TrialLevelSelect] = "Game.UI.TrialLevelSelect.TrialLevelSelectPanel",
|
||||
[PanelId.TrialFormation] = "Game.UI.TrialLevelSelect.TrialFormationPanel",
|
||||
@@ -197,15 +201,15 @@ local PanelDefine = {
|
||||
[PanelId.TrialDepot] = "Game.UI.TrialBattle.TrialDepotPanel",
|
||||
[PanelId.TrialResult] = "Game.UI.TrialBattle.TrialResultPanel",
|
||||
[PanelId.NpcAffinityRewardPanel] = "Game.UI.StarTowerBook.Affinity.AffinityRewardPanel",
|
||||
[PanelId.JointDrillLevelSelect_510001] = "Game.UI.JointDrill.JointDrill_1.JointDrillLevelSelectPanel_510001",
|
||||
[PanelId.JointDrillBuildList_510001] = "Game.UI.JointDrill.JointDrill_1.JointDrillBuildListPanel_510001",
|
||||
[PanelId.JointDrillLevelSelect_Mode1] = "Game.UI.JointDrill.JointDrill_1.JointDrillLevelSelectPanel",
|
||||
[PanelId.JointDrillBuildList_Mode1] = "Game.UI.JointDrill.JointDrill_1.JointDrillBuildListPanel",
|
||||
[PanelId.JointDrillBattlePanel] = "Game.UI.Battle.JointDrillBattlePanel",
|
||||
[PanelId.JointDrillResult_510001] = "Game.UI.JointDrill.JointDrill_1.JointDrillResultPanel_510001",
|
||||
[PanelId.JointDrillRankUp_510001] = "Game.UI.JointDrill.JointDrill_1.JointDrillRankUpPanel_510001",
|
||||
[PanelId.JointDrillQuest_510001] = "Game.UI.JointDrill.JointDrill_1.JointDrillQuestPanel_510001",
|
||||
[PanelId.JointDrillRanking_510001] = "Game.UI.JointDrill.JointDrill_1.JointDrillRankingPanel_510001",
|
||||
[PanelId.JointDrillRankDetail_510001] = "Game.UI.JointDrill.JointDrill_1.JointDrillRankDetailPanel_510001",
|
||||
[PanelId.JointDrillRaid_510001] = "Game.UI.JointDrill.JointDrill_1.JointDrillRaidPanel_510001",
|
||||
[PanelId.JointDrillResult_Mode1] = "Game.UI.JointDrill.JointDrill_1.JointDrillResultPanel",
|
||||
[PanelId.JointDrillRankUp_Mode1] = "Game.UI.JointDrill.JointDrill_1.JointDrillRankUpPanel",
|
||||
[PanelId.JointDrillQuest_Mode1] = "Game.UI.JointDrill.JointDrill_1.JointDrillQuestPanel",
|
||||
[PanelId.JointDrillRanking_Mode1] = "Game.UI.JointDrill.JointDrill_1.JointDrillRankingPanel",
|
||||
[PanelId.JointDrillRankDetail_Mode1] = "Game.UI.JointDrill.JointDrill_1.JointDrillRankDetailPanel",
|
||||
[PanelId.JointDrillRaid_Mode1] = "Game.UI.JointDrill.JointDrill_1.JointDrillRaidPanel",
|
||||
[PanelId.TowerDefenseSelectPanel] = "Game.UI.TowerDefense.TowerDefenseSelectPanel",
|
||||
[PanelId.TowerDefenseLevelDetailPanel] = "Game.UI.TowerDefense.TowerDefenseLevelDetailPanel",
|
||||
[PanelId.NPCAffinityLevelUp] = "Game.UI.StarTower.NpcAffinityLevelUp.NPCFavorLevelUpPanel",
|
||||
@@ -220,6 +224,12 @@ local PanelDefine = {
|
||||
[PanelId.TowerDefenseQuest] = "Game.UI.TowerDefense.TowerDefenseQuestPanel",
|
||||
[PanelId.TowerDefenseResultPanel] = "Game.UI.TowerDefense.TowerDefenseResultPanel",
|
||||
[PanelId.ScoreBossRankingPanel] = "Game.UI.ScoreBoss.ScoreBossRanking.ScoreBossRankingPanel",
|
||||
[PanelId.TraceHunt] = "Game.UI.TraceHunt.TraceHuntPanel",
|
||||
[PanelId.TraceHuntLevel] = "Game.UI.TraceHunt.TraceHuntLevelPanel",
|
||||
[PanelId.TraceHuntHelp] = "Game.UI.TraceHunt.TraceHuntHelpPanel",
|
||||
[PanelId.TraceHuntHandBook] = "Game.UI.TraceHunt.TraceHuntHandBookPanel",
|
||||
[PanelId.TraceHuntBattle] = "Game.UI.Battle.TraceHuntBattlePanel",
|
||||
[PanelId.TraceHuntResult] = "Game.UI.TraceHunt.TraceHuntResultPanel",
|
||||
[PanelId.TowerDefenseTipsPanel] = "Game.UI.TowerDefense.TowerDefTipsPanel",
|
||||
[PanelId.ActivityLevelsBattlePanel] = "Game.UI.Battle.ActivityLevelsBattlePanel",
|
||||
[PanelId.ActivityLevelsSelectPanel] = "Game.UI.ActivityTheme.Swim.ActivityLevels.ActivityLevelsSelectPanel",
|
||||
@@ -258,7 +268,7 @@ local PanelDefine = {
|
||||
[PanelId.QuestNewbie] = "Game.UI.QuestNewbie.QuestNewbiePanel",
|
||||
[PanelId.TowerDefenseTestPanel] = "Game.Editor.TowerDefense.TowerDefenseTestPanel",
|
||||
[PanelId.TowerDefenseTestResultPanel] = "Game.Editor.TowerDefense.TowerDefenseTestResultPanel",
|
||||
[PanelId.TrekkerVersus] = "Game.UI.TrekkerVersus_600002.TrekkerVersusPanel",
|
||||
[PanelId.TrekkerVersus] = "Game.UI.TrekkerVersus_600003.TrekkerVersusPanel",
|
||||
[PanelId.ActivityLevelsSelectPanel_20101] = "Game.UI.ActivityTheme.20101.ActivityLevels.ActivityLevelsSelectPanel",
|
||||
[PanelId.ChristmasThemePanel] = "Game.UI.ActivityTheme.20101.ChristmasThemePanel",
|
||||
[PanelId.BreakOutLevelDetailPanel] = "Game.UI.Play_BreakOut_30101.BreakOutLevelDetailPanel",
|
||||
@@ -278,23 +288,16 @@ local PanelDefine = {
|
||||
[PanelId.ThrowGiftLevelPanel] = "Game.UI.Activity.ThrowGifts.ThrowGiftPanel",
|
||||
[PanelId.ThrowGiftPanel_400009] = "Game.UI.Activity.ThrowGifts.ThrowGiftLevelSelectPanel_400009",
|
||||
[PanelId.ThrowGiftLevelPanel_400009] = "Game.UI.Activity.ThrowGifts.ThrowGiftPanel_400009",
|
||||
[PanelId.JointDrillLevelSelect_510003] = "Game.UI.JointDrill.JointDrill_2.JointDrillLevelSelectPanel_510003",
|
||||
[PanelId.JointDrillBuildList_510003] = "Game.UI.JointDrill.JointDrill_2.JointDrillBuildListPanel_510003",
|
||||
[PanelId.JointDrillResult_510003] = "Game.UI.JointDrill.JointDrill_2.JointDrillResultPanel_510003",
|
||||
[PanelId.JointDrillRankUp_510003] = "Game.UI.JointDrill.JointDrill_2.JointDrillRankUpPanel_510003",
|
||||
[PanelId.JointDrillQuest_510003] = "Game.UI.JointDrill.JointDrill_2.JointDrillQuestPanel_510003",
|
||||
[PanelId.JointDrillRanking_510003] = "Game.UI.JointDrill.JointDrill_2.JointDrillRankingPanel_510003",
|
||||
[PanelId.JointDrillRankDetail_510003] = "Game.UI.JointDrill.JointDrill_2.JointDrillRankDetailPanel_510003",
|
||||
[PanelId.JointDrillRaid_510003] = "Game.UI.JointDrill.JointDrill_2.JointDrillRaidPanel_510003",
|
||||
[PanelId.JointDrillLevelSelect_510005] = "Game.UI.JointDrill.JointDrill_2.JointDrillLevelSelectPanel_510005",
|
||||
[PanelId.JointDrillBuildList_510005] = "Game.UI.JointDrill.JointDrill_2.JointDrillBuildListPanel_510005",
|
||||
[PanelId.JointDrillResult_510005] = "Game.UI.JointDrill.JointDrill_2.JointDrillResultPanel_510005",
|
||||
[PanelId.JointDrillRankUp_510005] = "Game.UI.JointDrill.JointDrill_2.JointDrillRankUpPanel_510005",
|
||||
[PanelId.JointDrillQuest_510005] = "Game.UI.JointDrill.JointDrill_2.JointDrillQuestPanel_510005",
|
||||
[PanelId.JointDrillRanking_510005] = "Game.UI.JointDrill.JointDrill_2.JointDrillRankingPanel_510005",
|
||||
[PanelId.JointDrillRankDetail_510005] = "Game.UI.JointDrill.JointDrill_2.JointDrillRankDetailPanel_510005",
|
||||
[PanelId.JointDrillRaid_510005] = "Game.UI.JointDrill.JointDrill_2.JointDrillRaidPanel_510005",
|
||||
[PanelId.JointDrillLevelSelect_Mode2] = "Game.UI.JointDrill.JointDrill_2.JointDrillLevelSelectPanel",
|
||||
[PanelId.JointDrillBuildList_Mode2] = "Game.UI.JointDrill.JointDrill_2.JointDrillBuildListPanel",
|
||||
[PanelId.JointDrillResult_Mode2] = "Game.UI.JointDrill.JointDrill_2.JointDrillResultPanel",
|
||||
[PanelId.JointDrillRankUp_Mode2] = "Game.UI.JointDrill.JointDrill_2.JointDrillRankUpPanel",
|
||||
[PanelId.JointDrillQuest_Mode2] = "Game.UI.JointDrill.JointDrill_2.JointDrillQuestPanel",
|
||||
[PanelId.JointDrillRanking_Mode2] = "Game.UI.JointDrill.JointDrill_2.JointDrillRankingPanel",
|
||||
[PanelId.JointDrillRankDetail_Mode2] = "Game.UI.JointDrill.JointDrill_2.JointDrillRankDetailPanel",
|
||||
[PanelId.JointDrillRaid_Mode2] = "Game.UI.JointDrill.JointDrill_2.JointDrillRaidPanel",
|
||||
[PanelId.PenguinCard] = "Game.UI.Play_PenguinCard.PenguinCardPanel",
|
||||
[PanelId.PenguinCardEndless] = "Game.UI.Play_PenguinCard.EndlessMode.PenguinCardPanel",
|
||||
[PanelId.PenguinCardQuest] = "Game.UI.Play_PenguinCard.PenguinCardQuestPanel",
|
||||
[PanelId.PenguinCardLevel] = "Game.UI.Play_PenguinCard.PenguinCardSelectPanel",
|
||||
[PanelId.ActivityLevelsSelectPanel_10104] = "Game.UI.ActivityTheme.10104.ActivityLevels.ActivityLevelsSelectPanel",
|
||||
@@ -360,7 +363,54 @@ local PanelDefine = {
|
||||
[PanelId.GoldenSpyLevelSelectPanel_400012] = "Game.UI.Activity.GoldenSpy.400012.GoldenSpyLevelSelectPanel",
|
||||
[PanelId.GoldenSpyBuffSelectPanel_400012] = "Game.UI.Activity.GoldenSpy.400012.GoldenSpyBuffSelectPanel",
|
||||
[PanelId.GoldenSpyResultPanel_400012] = "Game.UI.Activity.GoldenSpy.400012.GoldenSpyResultPanel",
|
||||
[PanelId.GoldenSpyBuffTipsPanel_400012] = "Game.UI.Activity.GoldenSpy.400012.GoldenSpyBuffTipsPanel"
|
||||
[PanelId.GoldenSpyBuffTipsPanel_400012] = "Game.UI.Activity.GoldenSpy.400012.GoldenSpyBuffTipsPanel",
|
||||
[PanelId.MiningGame_400014] = "Game.UI.Activity.Mining.400014.MiningGamePanel",
|
||||
[PanelId.MiningGameGuidePanel_400014] = "Game.UI.Activity.Mining.400014.MiningGameGuidePanel",
|
||||
[PanelId.MiningGameQuestPanel_400014] = "Game.UI.Activity.Mining.400014.MiningGameQuestPanel",
|
||||
[PanelId.SoldierTestEnter] = "Game.UI.Soldier.SoldierTestEnterPanel",
|
||||
[PanelId.SoldierBattlePanel] = "Game.UI.Soldier.Battle.SoldierBattlePanel",
|
||||
[PanelId.SoldierBattleResult] = "Game.UI.Soldier.Battle.SoldierBattleResultPanel",
|
||||
[PanelId.SoldierSelectPolicy] = "Game.UI.Soldier.SelectPolicy.SoldierSelectPolicyPanel",
|
||||
[PanelId.SoldierMainViewPanel] = "Game.UI.Soldier.SoldierMainViewPanel",
|
||||
[PanelId.SoldierLevelSelectPanel] = "Game.UI.Soldier.SoldierLevelSelectPanel",
|
||||
[PanelId.SoldierHandbookPanel] = "Game.UI.Soldier.Handbook.SoldierHandbookPanel",
|
||||
[PanelId.SoldierQuestPanel] = "Game.UI.Soldier.SoldierQuestPanel",
|
||||
[PanelId.SoldierHandbookSelectPanel] = "Game.UI.Soldier.Handbook.SoldierHandbookSelectPanel",
|
||||
[PanelId.SoldierSandtable] = "Game.UI.Soldier.Sandtable.SoldierSandtablePanel",
|
||||
[PanelId.SoldierBuffTipsPanel] = "Game.UI.Soldier.Sandtable.Components.SoldierBuffTipsPanel",
|
||||
[PanelId.SoldierHandbookPartnerDetailPanel] = "Game.UI.Soldier.Handbook.SoldierHandbookPartnerDetailPanel",
|
||||
[PanelId.SoldierSelectStrategyCardItem] = "Game.UI.Soldier.Handbook.SoldierSelectStrategyCardItemPanel",
|
||||
[PanelId.SoldierSelectStarterCardItem] = "Game.UI.Soldier.Handbook.SoldierSelectStarterCardItemPanel",
|
||||
[PanelId.SoldierRecommendPanel] = "Game.UI.Soldier.Recommend.SoldierRecommendPanel",
|
||||
[PanelId.SoldierRecommendDetailPanel] = "Game.UI.Soldier.Recommend.SoldierRecommendDetailPanel",
|
||||
[PanelId.SoldierPartnerTips] = "Game.UI.Soldier.PartnerTipsPanel.SoldierPartnerTipsPanel",
|
||||
[PanelId.SoldierGoldTips] = "Game.UI.Soldier.GoldTipsPanel.SoldierGoldTipsPanel",
|
||||
[PanelId.SoldierCharAttriTips] = "Game.UI.Soldier.CharacterAttriTips.SoldierCharAttriTipsPanel",
|
||||
[PanelId.SoldierCharCardTips] = "Game.UI.Soldier.CharacterTips.SoldierCharTipsPanel",
|
||||
[PanelId.SoldierCharSkillPreview] = "Game.UI.Soldier.CharacterTips.SoldierCharSkillPreviewPanel",
|
||||
[PanelId.SoldierCharSkillDetail] = "Game.UI.Soldier.CharacterTips.SoldierCharSkillDetailPanel",
|
||||
[PanelId.SoldierCharPontentialDetailPanel] = "Game.UI.Soldier.CharacterTips.Components.SoldierCharTalentDetailPanel",
|
||||
[PanelId.SoldierBattleEventPanel] = "Game.UI.Soldier.BattleEvent.SoldierBattleEventPanel",
|
||||
[PanelId.SoldierResolveadisputePanel] = "Game.UI.Soldier.BattleEvent.SoldierResolveadisputePanel",
|
||||
[PanelId.SoldierShopProbabilityPanel] = "Game.UI.Soldier.ShopProbability.SoldierShopProbabilityPanel",
|
||||
[PanelId.Task_20103] = "Game.UI.ActivityTheme.20103.Task.SummerCheckinTaskPanel",
|
||||
[PanelId.Shop_20103] = "Game.UI.ActivityTheme.20103.Shop.ActivityShopPanel",
|
||||
[PanelId.Main_20103] = "Game.UI.ActivityTheme.20103.SummerCheckinThemePanel",
|
||||
[PanelId.ActivityLevelsSelectPanel_20103] = "Game.UI.ActivityTheme.20103.ActivityLevels.ActivityLevelsSelectPanel",
|
||||
[PanelId.SummerCheckinStory_20103] = "Game.UI.ActivityTheme.20103.Story.SummerCheckinStoryPanel",
|
||||
[PanelId.IceCreamTruckGamePanel] = "Game.UI.Play_IceCreamTruck.Play.IceCreamTruckGamePanel",
|
||||
[PanelId.IceCreamLevelsSelectPanel] = "Game.UI.Play_IceCreamTruck.IceCreamLevelsSelectPanel",
|
||||
[PanelId.ActivityLevelsSelectPanel_10110] = "Game.UI.ActivityTheme.10110.ActivityLevels.ActivityLevelsSelectPanel",
|
||||
[PanelId.Task_10110] = "Game.UI.ActivityTheme.10110.Task.SummerAdvTaskPanel",
|
||||
[PanelId.Shop_10110] = "Game.UI.ActivityTheme.10110.Shop.ActivityShopPanel",
|
||||
[PanelId.SummerAdvPanel] = "Game.UI.ActivityTheme.10110.SummerAdvPanel",
|
||||
[PanelId.SummerAdvStory_10110] = "Game.UI.ActivityTheme.10110.Story.SummerAdvStoryPanel",
|
||||
[PanelId.BreakOutThemePanel_S3] = "Game.UI.ActivityTheme.30103.BreakOutThemePanel",
|
||||
[PanelId.Shop_30103] = "Game.UI.ActivityTheme.30103.Shop.ActivityShopPanel",
|
||||
[PanelId.Task_30103] = "Game.UI.ActivityTheme.30103.Task.BreakOutTaskPanel",
|
||||
[PanelId.BreakOutLevelDetailPanelS3] = "Game.UI.Play_BreakOut_30103.BreakOutLevelDetailPanel",
|
||||
[PanelId.BreakOutResultPanelS3] = "Game.UI.Play_BreakOut_30103.BreakOutResultPanel",
|
||||
[PanelId.BreakOutPlayPanelS3] = "Game.UI.Play_BreakOut_30103.BreakOutPlayPanel"
|
||||
}
|
||||
if NovaAPI.GetClientChannel() == AllEnum.ChannelName.BanShu then
|
||||
end
|
||||
|
||||
+76
-24
@@ -1,3 +1,4 @@
|
||||
local SoldierBuffTipsPanel = require("Game.UI.Soldier.Sandtable.Components.SoldierBuffTipsPanel")
|
||||
local PanelId = {
|
||||
AvgEditorMultiLanTool = -6,
|
||||
ExeEditor = -4,
|
||||
@@ -19,6 +20,7 @@ local PanelId = {
|
||||
CharList = 21,
|
||||
GachaSpin = 22,
|
||||
GachaGet = 23,
|
||||
FriendAddStranger = 24,
|
||||
CharacterSkinPanel = 26,
|
||||
ShopPanel = 27,
|
||||
ReceiveSpecialReward = 28,
|
||||
@@ -90,6 +92,7 @@ local PanelId = {
|
||||
DiscSucBar = 201,
|
||||
SkillSucBar = 204,
|
||||
CharSucBar = 205,
|
||||
TraceHuntSucBar = 206,
|
||||
CharBgPanel = 207,
|
||||
CampingJoystick = 209,
|
||||
BattleResultMask = 210,
|
||||
@@ -106,8 +109,15 @@ local PanelId = {
|
||||
CraftingTip = 232,
|
||||
SubSkillDisplay = 225,
|
||||
PenguinCard = 226,
|
||||
PenguinCardEndless = 237,
|
||||
PenguinCardQuest = 227,
|
||||
PenguinCardLevel = 228,
|
||||
TraceHunt = 229,
|
||||
TraceHuntLevel = 230,
|
||||
TraceHuntHelp = 233,
|
||||
TraceHuntHandBook = 234,
|
||||
TraceHuntBattle = 235,
|
||||
TraceHuntResult = 236,
|
||||
ActivityList = 241,
|
||||
ActivityPopUp = 242,
|
||||
ActivityInfinity = 243,
|
||||
@@ -210,10 +220,10 @@ local PanelId = {
|
||||
TowerDefenseCharacterDetailPanel = 137,
|
||||
TowerDefenseHUD = 138,
|
||||
TowerDefenseQuest = 139,
|
||||
JointDrillLevelSelect_510001 = 140,
|
||||
JointDrillBuildList_510001 = 141,
|
||||
JointDrillLevelSelect_Mode1 = 140,
|
||||
JointDrillBuildList_Mode1 = 141,
|
||||
JointDrillBattlePanel = 142,
|
||||
JointDrillResult_510001 = 144,
|
||||
JointDrillResult_Mode1 = 144,
|
||||
NPCAffinityLevelUp = 145,
|
||||
StoryEntrance = 146,
|
||||
BuildAttribute = 147,
|
||||
@@ -221,17 +231,17 @@ local PanelId = {
|
||||
SwimTheme = 149,
|
||||
TutorialPanel = 280,
|
||||
CreatePlayer = 150,
|
||||
JointDrillRankUp_510001 = 151,
|
||||
JointDrillQuest_510001 = 152,
|
||||
JointDrillRankUp_Mode1 = 151,
|
||||
JointDrillQuest_Mode1 = 152,
|
||||
TowerDefenseResultPanel = 153,
|
||||
ScoreBossRankingPanel = 154,
|
||||
TowerDefenseTipsPanel = 155,
|
||||
ActivityLevelsBattlePanel = 156,
|
||||
ActivityLevelsSelectPanel = 157,
|
||||
ActivityLevelsInstanceResultPanel = 158,
|
||||
JointDrillRanking_510001 = 159,
|
||||
JointDrillRankDetail_510001 = 160,
|
||||
JointDrillRaid_510001 = 161,
|
||||
JointDrillRanking_Mode1 = 159,
|
||||
JointDrillRankDetail_Mode1 = 160,
|
||||
JointDrillRaid_Mode1 = 161,
|
||||
MiningGameGuidePanel = 162,
|
||||
SwimThemeStory = 163,
|
||||
BuildAttrPreview = 164,
|
||||
@@ -298,14 +308,14 @@ local PanelId = {
|
||||
CookieGamePanel_400004 = 384,
|
||||
Main_10103 = 385,
|
||||
ThrowGiftPanel = 386,
|
||||
JointDrillLevelSelect_510003 = 387,
|
||||
JointDrillBuildList_510003 = 388,
|
||||
JointDrillResult_510003 = 389,
|
||||
JointDrillRankUp_510003 = 390,
|
||||
JointDrillQuest_510003 = 391,
|
||||
JointDrillRanking_510003 = 392,
|
||||
JointDrillRankDetail_510003 = 393,
|
||||
JointDrillRaid_510003 = 394,
|
||||
JointDrillLevelSelect_Mode2 = 387,
|
||||
JointDrillBuildList_Mode2 = 388,
|
||||
JointDrillResult_Mode2 = 389,
|
||||
JointDrillRankUp_Mode2 = 390,
|
||||
JointDrillQuest_Mode2 = 391,
|
||||
JointDrillRanking_Mode2 = 392,
|
||||
JointDrillRankDetail_Mode2 = 393,
|
||||
JointDrillRaid_Mode2 = 394,
|
||||
ActivityLevelsSelectPanel_10104 = 395,
|
||||
Shop_10104 = 396,
|
||||
Task_10104 = 397,
|
||||
@@ -368,14 +378,6 @@ local PanelId = {
|
||||
TechStory = 456,
|
||||
CookieBoardPanel_400010 = 457,
|
||||
CookieGamePanel_400010 = 458,
|
||||
JointDrillLevelSelect_510005 = 459,
|
||||
JointDrillBuildList_510005 = 460,
|
||||
JointDrillResult_510005 = 461,
|
||||
JointDrillRankUp_510005 = 462,
|
||||
JointDrillQuest_510005 = 463,
|
||||
JointDrillRanking_510005 = 464,
|
||||
JointDrillRankDetail_510005 = 465,
|
||||
JointDrillRaid_510005 = 466,
|
||||
DoubleDropActQuestPanel_103001 = 467,
|
||||
ActivityLevelsSelectPanel_10109 = 468,
|
||||
GunStormPanel = 469,
|
||||
@@ -387,6 +389,56 @@ local PanelId = {
|
||||
GoldenSpyBuffSelectPanel_400012 = 475,
|
||||
GoldenSpyResultPanel_400012 = 476,
|
||||
GoldenSpyBuffTipsPanel_400012 = 477,
|
||||
MiningGame_400014 = 478,
|
||||
MiningGameGuidePanel_400014 = 479,
|
||||
MiningGameQuestPanel_400014 = 480,
|
||||
SoldierBattlePanel = 481,
|
||||
SoldierBattleResult = 482,
|
||||
SoldierMainViewPanel = 483,
|
||||
SoldierLevelSelectPanel = 484,
|
||||
SoldierHandbookPanel = 485,
|
||||
SoldierQuestPanel = 486,
|
||||
SoldierHandbookSelectPanel = 487,
|
||||
SoldierHandbookPartnerDetailPanel = 496,
|
||||
SoldierRecommendPanel = 497,
|
||||
SoldierRecommendDetailPanel = 498,
|
||||
SoldierSelectPolicy = 488,
|
||||
SoldierSandtable = 489,
|
||||
ActivityLevelsSelectPanel_20103 = 490,
|
||||
Main_20103 = 491,
|
||||
SummerCheckinStory_20103 = 492,
|
||||
Task_20103 = 493,
|
||||
Shop_20103 = 494,
|
||||
SoldierNodeTips = 495,
|
||||
SoldierPartnerTips = 499,
|
||||
SoldierGoldTips = 5000,
|
||||
SoldierCharAttriTips = 5001,
|
||||
SoldierCharCardTips = 5002,
|
||||
SoldierCharSkillPreview = 5003,
|
||||
SoldierCharSkillDetail = 5004,
|
||||
SoldierBuffTipsPanel = 5005,
|
||||
SoldierCharPontentialDetailPanel = 5006,
|
||||
SoldierSelectStrategyCardItem = 5007,
|
||||
SoldierSelectStarterCardItem = 5008,
|
||||
CookieBoardPanel_400016 = 500,
|
||||
CookieGamePanel_400016 = 501,
|
||||
IceCreamTruckGamePanel = 502,
|
||||
IceCreamLevelsSelectPanel = 503,
|
||||
SoldierBattleEventPanel = 504,
|
||||
SoldierResolveadisputePanel = 505,
|
||||
SoldierShopProbabilityPanel = 506,
|
||||
ActivityLevelsSelectPanel_10110 = 507,
|
||||
SummerAdvPanel = 508,
|
||||
SummerAdvStory_10110 = 509,
|
||||
Task_10110 = 510,
|
||||
Shop_10110 = 511,
|
||||
Shop_30103 = 512,
|
||||
BreakOutThemePanel_S3 = 513,
|
||||
Task_30103 = 514,
|
||||
BreakOutLevelDetailPanelS3 = 515,
|
||||
BreakOutResultPanelS3 = 516,
|
||||
BreakOutPlayPanelS3 = 517,
|
||||
SoldierTestEnter = 99998,
|
||||
GmTools = 99999
|
||||
}
|
||||
return PanelId
|
||||
|
||||
@@ -456,6 +456,9 @@ local ResetTouchEffect = function()
|
||||
NovaAPI.ResetTouchEffect(trNode:Find("TouchEffectUI/fxContainer"), objMain, objSlide)
|
||||
end
|
||||
end
|
||||
local RegisterTextGetContentFun = function()
|
||||
CS.TextMeshProWrap.GetTextFunc = ConfigTable.GetUIText
|
||||
end
|
||||
function PanelManager.Init()
|
||||
local goUIRoot = GameObject.Find("==== UI ROOT ====")
|
||||
if goUIRoot ~= nil then
|
||||
@@ -482,6 +485,7 @@ function PanelManager.Init()
|
||||
tbBackHistory = {}
|
||||
tbDisposablePanel = {}
|
||||
mapDefinePanel = require("GameCore.UI.PanelDefine")
|
||||
RegisterTextGetContentFun()
|
||||
AddEventCallback()
|
||||
InitGuidePanel()
|
||||
InitTransitionPanel()
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
local UIObjs = class("UIObjs")
|
||||
local _instanceIndex = function(t, name)
|
||||
local v = rawget(UIObjs, name)
|
||||
if v ~= nil then
|
||||
return v
|
||||
end
|
||||
if name == "_keys" then
|
||||
local _keys = string.split(t._CSUIObjs.Keys, ",")
|
||||
rawset(t, "_keys", _keys)
|
||||
return _keys
|
||||
end
|
||||
local maps = t._objMaps
|
||||
local cached = maps[name]
|
||||
if cached ~= nil then
|
||||
return cached
|
||||
end
|
||||
local obj = t._CSUIObjs:Get(name)
|
||||
if obj == nil then
|
||||
return nil
|
||||
end
|
||||
maps[name] = obj
|
||||
local type_name = obj:GetType().Name
|
||||
t._objTypeMaps[name] = type_name
|
||||
return obj, type_name
|
||||
end
|
||||
function UIObjs:ctor(CSUIObjs, ctrl)
|
||||
self._CSUIObjs = CSUIObjs
|
||||
self._objMaps = {}
|
||||
self._objTypeMaps = {}
|
||||
self._ctrl = ctrl
|
||||
setmetatable(self, {__index = _instanceIndex})
|
||||
end
|
||||
function UIObjs:Get(name)
|
||||
local obj = self[name]
|
||||
if obj == nil then
|
||||
return nil, nil
|
||||
end
|
||||
return obj, self._objTypeMaps[name]
|
||||
end
|
||||
return UIObjs
|
||||
Reference in New Issue
Block a user