UIPvP页面

This commit is contained in:
fatiao 2025-09-15 14:25:52 +08:00
parent c236170e02
commit 9ec3c88c0e
16 changed files with 4291 additions and 2 deletions

View File

@ -2287,6 +2287,11 @@ MonoBehaviour:
m_ReadOnly: 0
m_SerializedLabels: []
FlaggedDuringContentUpdateRestriction: 0
- m_GUID: 9a2921f4df062214eb2e71c280f5eff3
m_Address: Assets/Content/Prefabs/Models/Monster/test_monster.prefab
m_ReadOnly: 0
m_SerializedLabels: []
FlaggedDuringContentUpdateRestriction: 0
m_ReadOnly: 0
m_Settings: {fileID: 11400000, guid: 8b54c61ef06dca34e89fcf16d0b8c4b3, type: 2}
m_SchemaSet:

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 4913c8b20ed87104b8ad0bca6ba02bb6
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

File diff suppressed because it is too large Load Diff

View File

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

View File

@ -5697,5 +5697,27 @@ local UICfg = {
['top_btn_display_state']=false,
['NoPay']=false,
},
[3008]={
['id']=3008,
['name']='UIPvP',
['type']=3,
['mainViewType']=0,
['need_mask']=false,
['lua_path']='',
['res_path']='UIPvP/UIPvP',
['childPaths']='',
['page_anim_in_type']=3,
['page_anim_out_type']=4,
['hide_main_top']=false,
['hide_main_bottom']=false,
['need_persistent']=false,
['battle_main_page']=false,
['need_cache']=true,
['can_limit_gift']=false,
['top_res_id']=0,
['top_btn_display_state']=false,
['NoPay']=false,
},
}
return UICfg

View File

@ -180,7 +180,8 @@ local Enum = {
UITeam = 3004,
UIRoleInfo = 3005,
UISkillList = 3006,
UIGoddess = 3007
UIGoddess = 3007,
UIPvP = 3008,
},
ParamState = {

View File

@ -299,5 +299,6 @@ local UIPageName = {
UIRoleInfo = 3005,
UISkillList = 3006,
UIGoddess = 3007,
UIPvP = 3008,
}
return setmetatable(UIPageName, { __index = Enum.UIPageName })

View File

@ -545,6 +545,9 @@ function ArenaData:OnArenaNtf(data)
elseif self.fromUIId == Enum.UIPageName.UIDojo2D then
ManagerContainer.LuaUIMgr:Open(Enum.UIPageName.UIDojo2D,nil, self.backUIId or Enum.UIPageName.UIMainCity1)
ManagerContainer.LuaEventMgr:Dispatch(UIEventNames.UI_CLOSE_TASK_PAGE)
elseif self.fromUIId == Enum.UIPageName.UIPvP then
ManagerContainer.LuaUIMgr:Open(Enum.UIPageName.UIPvP,nil, self.backUIId or Enum.UIPageName.UIMainCity1)
ManagerContainer.LuaEventMgr:Dispatch(UIEventNames.UI_CLOSE_TASK_PAGE)
end
self.fromUIId = nil

View File

@ -896,7 +896,7 @@ function UIMainView:ChangePageMsg(pageType, data)
ManagerContainer.LuaUIMgr:Open(Enum.UIPageName.UIGoddess, nil, self.uiData.id)
elseif pageType == Enum.MainViewPageType.Rank then
--ManagerContainer.LuaUIMgr:Open(Enum.UIPageName.UIRank)
ManagerContainer.DataMgr.ArenaData:SendArenaDataReq(Enum.UIPageName.UIDojo2D)
ManagerContainer.DataMgr.ArenaData:SendArenaDataReq(Enum.UIPageName.UIPvP)
end
end

8
Assets/Lua/UI/UIPvP.meta Normal file
View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: dc3cb2ae463353c499f6b61c0740f484
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,28 @@
local UIPvPCtr = class("UIPvPCtr", require("UICtrBase"))
function UIPvPCtr:Init(view)
self.view = view
end
function UIPvPCtr:SetData(data)
self.asyncIdx = 0
if data == nil then return end
self.data = data
end
function UIPvPCtr:GetAsyncIdx()
self.asyncIdx = self.asyncIdx + 1
return self.asyncIdx
end
function UIPvPCtr:GetData()
return self.data
end
function UIPvPCtr:OnDispose()
self.data = nil
self.view = nil
end
return UIPvPCtr

View File

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

View File

@ -0,0 +1,55 @@
local UIPvPView = require("UIPvP/UIPvPView_Generate")
function UIPvPView:OnAwake(data)
self.controller = require("UIPvP/UIPvPCtr"):new()
self.controller:Init(self)
self.controller:SetData(data)
end
function UIPvPView:AddEventListener()
ManagerContainer.LuaEventMgr:RegisterUIEvent(self.uiData.name)
end
function UIPvPView:FillContent(data, uiBase)
self.uiBase = uiBase
local gameObject = self.uiBase:GetRoot()
if gameObject ~= nil then
self.gameObject = gameObject
self.transform = gameObject.transform
end
self:InitGenerate(self.transform, data)
self:Init()
end
function UIPvPView:Init()
end
function UIPvPView:RemoveEventListener()
ManagerContainer.LuaEventMgr:Unregister(self.uiData.name)
end
function UIPvPView:AddUIEventListener()
end
function UIPvPView:OnHide()
end
function UIPvPView:OnShow(data)
self.controller:SetData(data)
end
function UIPvPView:OnClose()
end
function UIPvPView:OnDispose()
self.controller:OnDispose()
end
return UIPvPView

View File

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

View File

@ -0,0 +1,381 @@
---@class UIPvP__Generate_btnSaveTeam
---@field public gameObject UnityEngine.GameObject
---@field public button UnityEngine.UI.Button
---@class UIPvP__Generate_btnEditTeam
---@field public gameObject UnityEngine.GameObject
---@field public button UnityEngine.UI.Button
---@class UIPvP__Generate_backBtn
---@field public gameObject UnityEngine.GameObject
---@field public button UnityEngine.UI.Button
---@class UIPvP__Generate_fighterPowerText
---@field public gameObject UnityEngine.GameObject
---@field public text UnityEngine.UI.Text
---@class UIPvP__Generate_hero6
---@field public gameObject UnityEngine.GameObject
---@field public rectTransform UnityEngine.RectTransform
---@class UIPvP__Generate_hero5
---@field public gameObject UnityEngine.GameObject
---@field public rectTransform UnityEngine.RectTransform
---@class UIPvP__Generate_hero4
---@field public gameObject UnityEngine.GameObject
---@field public rectTransform UnityEngine.RectTransform
---@class UIPvP__Generate_hero3
---@field public gameObject UnityEngine.GameObject
---@field public rectTransform UnityEngine.RectTransform
---@class UIPvP__Generate_hero2
---@field public gameObject UnityEngine.GameObject
---@field public rectTransform UnityEngine.RectTransform
---@class UIPvP__Generate_hero1
---@field public gameObject UnityEngine.GameObject
---@field public rectTransform UnityEngine.RectTransform
---@class UIPvP__Generate
---@field private gameObject UnityEngine.GameObject
---@field private transform UnityEngine.Transform
---@field private selectedHero2 UnityEngine.GameObject
---@field private selectedHero3 UnityEngine.GameObject
---@field private selectedHero1 UnityEngine.GameObject
---@field private selectedHero4 UnityEngine.GameObject
---@field private roleList UnityEngine.GameObject
---@field private roleListAnim UnityEngine.GameObject
---@field private hero1 UIPvP__Generate_hero1
---@field private hero2 UIPvP__Generate_hero2
---@field private hero3 UIPvP__Generate_hero3
---@field private hero4 UIPvP__Generate_hero4
---@field private hero5 UIPvP__Generate_hero5
---@field private hero6 UIPvP__Generate_hero6
---@field private fighterPowerText UIPvP__Generate_fighterPowerText
---@field private backBtn UIPvP__Generate_backBtn
---@field private btnEditTeam UIPvP__Generate_btnEditTeam
---@field private btnSaveTeam UIPvP__Generate_btnSaveTeam
local UIPvPView = class("UIPvPView", require("UIViewBase"))
function UIPvPView:ctor()
end
---@private
function UIPvPView:SetActive(result)
self.gameObject:SetActive(result)
end
---@private
function UIPvPView:InitGenerate(Root, data)
self.transform = Root
self.inited = true
if self.super.Init then
self.super.Init(self)
end
local tmp
self:InitGenerate__1(Root,data)
self:InitGenerate__2(Root,data)
self:InitGenerate__3(Root,data)
self:InitGenerate__4(Root,data)
self:InitGenerate__5(Root,data)
self:InitGenerate__6(Root,data)
self:InitGenerate__7(Root,data)
self:InitGenerate__8(Root,data)
self:InitGenerate__9(Root,data)
self:InitGenerate__10(Root,data)
self:InitGenerate__11(Root,data)
self:InitGenerate__12(Root,data)
self:InitGenerate__13(Root,data)
self:InitGenerate__14(Root,data)
self:InitGenerate__15(Root,data)
self:InitGenerate__16(Root,data)
end
---@private
function UIPvPView:InitGenerate__1(Root, data)
--[[
CenterView/Character2
--]]
local tmp = Root:Find("CenterView/Character2").gameObject
if tolua.getpeer(tmp) == nil then
tolua.setpeer(tmp, {})
end
self.selectedHero2 = tmp
end
---@private
function UIPvPView:InitGenerate__2(Root, data)
--[[
CenterView/Character3
--]]
local tmp = Root:Find("CenterView/Character3").gameObject
if tolua.getpeer(tmp) == nil then
tolua.setpeer(tmp, {})
end
self.selectedHero3 = tmp
end
---@private
function UIPvPView:InitGenerate__3(Root, data)
--[[
CenterView/Character1
--]]
local tmp = Root:Find("CenterView/Character1").gameObject
if tolua.getpeer(tmp) == nil then
tolua.setpeer(tmp, {})
end
self.selectedHero1 = tmp
end
---@private
function UIPvPView:InitGenerate__4(Root, data)
--[[
CenterView/Character4
--]]
local tmp = Root:Find("CenterView/Character4").gameObject
if tolua.getpeer(tmp) == nil then
tolua.setpeer(tmp, {})
end
self.selectedHero4 = tmp
end
---@private
function UIPvPView:InitGenerate__5(Root, data)
--[[
BottomView/RoleList
--]]
local tmp = Root:Find("BottomView/RoleList").gameObject
if tolua.getpeer(tmp) == nil then
tolua.setpeer(tmp, {})
end
self.roleList = tmp
end
---@private
function UIPvPView:InitGenerate__6(Root, data)
--[[
BottomView/RoleList/RoleListAnim
--]]
local tmp = Root:Find("BottomView/RoleList/RoleListAnim").gameObject
if tolua.getpeer(tmp) == nil then
tolua.setpeer(tmp, {})
end
self.roleListAnim = tmp
end
---@private
function UIPvPView:InitGenerate__7(Root, data)
--[[
BottomView/RoleList/RoleListAnim/Role1
--]]
local tmp = Root:Find("BottomView/RoleList/RoleListAnim/Role1").gameObject
if tolua.getpeer(tmp) == nil then
tolua.setpeer(tmp, {})
end
self.hero1 = tmp
tmp.rectTransform = tmp:GetComponent(Enum.TypeInfo.RectTransform)
end
---@private
function UIPvPView:InitGenerate__8(Root, data)
--[[
BottomView/RoleList/RoleListAnim/Role2
--]]
local tmp = Root:Find("BottomView/RoleList/RoleListAnim/Role2").gameObject
if tolua.getpeer(tmp) == nil then
tolua.setpeer(tmp, {})
end
self.hero2 = tmp
tmp.rectTransform = tmp:GetComponent(Enum.TypeInfo.RectTransform)
end
---@private
function UIPvPView:InitGenerate__9(Root, data)
--[[
BottomView/RoleList/RoleListAnim/Role3
--]]
local tmp = Root:Find("BottomView/RoleList/RoleListAnim/Role3").gameObject
if tolua.getpeer(tmp) == nil then
tolua.setpeer(tmp, {})
end
self.hero3 = tmp
tmp.rectTransform = tmp:GetComponent(Enum.TypeInfo.RectTransform)
end
---@private
function UIPvPView:InitGenerate__10(Root, data)
--[[
BottomView/RoleList/RoleListAnim/Role4
--]]
local tmp = Root:Find("BottomView/RoleList/RoleListAnim/Role4").gameObject
if tolua.getpeer(tmp) == nil then
tolua.setpeer(tmp, {})
end
self.hero4 = tmp
tmp.rectTransform = tmp:GetComponent(Enum.TypeInfo.RectTransform)
end
---@private
function UIPvPView:InitGenerate__11(Root, data)
--[[
BottomView/RoleList/RoleListAnim/Role5
--]]
local tmp = Root:Find("BottomView/RoleList/RoleListAnim/Role5").gameObject
if tolua.getpeer(tmp) == nil then
tolua.setpeer(tmp, {})
end
self.hero5 = tmp
tmp.rectTransform = tmp:GetComponent(Enum.TypeInfo.RectTransform)
end
---@private
function UIPvPView:InitGenerate__12(Root, data)
--[[
BottomView/RoleList/RoleListAnim/Role6
--]]
local tmp = Root:Find("BottomView/RoleList/RoleListAnim/Role6").gameObject
if tolua.getpeer(tmp) == nil then
tolua.setpeer(tmp, {})
end
self.hero6 = tmp
tmp.rectTransform = tmp:GetComponent(Enum.TypeInfo.RectTransform)
end
---@private
function UIPvPView:InitGenerate__13(Root, data)
--[[
BottomView/FightPowerInfo/Val
--]]
local tmp = Root:Find("BottomView/FightPowerInfo/Val").gameObject
if tolua.getpeer(tmp) == nil then
tolua.setpeer(tmp, {})
end
self.fighterPowerText = tmp
tmp.text = tmp:GetComponent(Enum.TypeInfo.Text)
end
---@private
function UIPvPView:InitGenerate__14(Root, data)
--[[
MenuBar/BtnBack
--]]
local tmp = Root:Find("MenuBar/BtnBack").gameObject
if tolua.getpeer(tmp) == nil then
tolua.setpeer(tmp, {})
end
self.backBtn = tmp
tmp.button = tmp:GetComponent(Enum.TypeInfo.Button)
end
---@private
function UIPvPView:InitGenerate__15(Root, data)
--[[
MenuBar/BtnEditTeam
--]]
local tmp = Root:Find("MenuBar/BtnEditTeam").gameObject
if tolua.getpeer(tmp) == nil then
tolua.setpeer(tmp, {})
end
self.btnEditTeam = tmp
tmp.button = tmp:GetComponent(Enum.TypeInfo.Button)
end
---@private
function UIPvPView:InitGenerate__16(Root, data)
--[[
MenuBar/BtnSaveTeam
--]]
local tmp = Root:Find("MenuBar/BtnSaveTeam").gameObject
if tolua.getpeer(tmp) == nil then
tolua.setpeer(tmp, {})
end
self.btnSaveTeam = tmp
tmp.button = tmp:GetComponent(Enum.TypeInfo.Button)
end
---@private
function UIPvPView:GenerateDestroy()
if tolua.getpeer(self.selectedHero2) ~= nil then
tolua.setpeer(self.selectedHero2, nil)
end
self.selectedHero2 = nil
if tolua.getpeer(self.selectedHero3) ~= nil then
tolua.setpeer(self.selectedHero3, nil)
end
self.selectedHero3 = nil
if tolua.getpeer(self.selectedHero1) ~= nil then
tolua.setpeer(self.selectedHero1, nil)
end
self.selectedHero1 = nil
if tolua.getpeer(self.selectedHero4) ~= nil then
tolua.setpeer(self.selectedHero4, nil)
end
self.selectedHero4 = nil
if tolua.getpeer(self.roleList) ~= nil then
tolua.setpeer(self.roleList, nil)
end
self.roleList = nil
if tolua.getpeer(self.roleListAnim) ~= nil then
tolua.setpeer(self.roleListAnim, nil)
end
self.roleListAnim = nil
if tolua.getpeer(self.hero1) ~= nil then
tolua.setpeer(self.hero1, nil)
end
self.hero1 = nil
if tolua.getpeer(self.hero2) ~= nil then
tolua.setpeer(self.hero2, nil)
end
self.hero2 = nil
if tolua.getpeer(self.hero3) ~= nil then
tolua.setpeer(self.hero3, nil)
end
self.hero3 = nil
if tolua.getpeer(self.hero4) ~= nil then
tolua.setpeer(self.hero4, nil)
end
self.hero4 = nil
if tolua.getpeer(self.hero5) ~= nil then
tolua.setpeer(self.hero5, nil)
end
self.hero5 = nil
if tolua.getpeer(self.hero6) ~= nil then
tolua.setpeer(self.hero6, nil)
end
self.hero6 = nil
if tolua.getpeer(self.fighterPowerText) ~= nil then
tolua.setpeer(self.fighterPowerText, nil)
end
self.fighterPowerText = nil
if tolua.getpeer(self.backBtn) ~= nil then
tolua.setpeer(self.backBtn, nil)
end
self.backBtn = nil
if tolua.getpeer(self.btnEditTeam) ~= nil then
tolua.setpeer(self.btnEditTeam, nil)
end
self.btnEditTeam = nil
if tolua.getpeer(self.btnSaveTeam) ~= nil then
tolua.setpeer(self.btnSaveTeam, nil)
end
self.btnSaveTeam = nil
self.transform = nil
self.gameObject = nil
self.inited = false
end
return UIPvPView

View File

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