PGRData/Script/matrix/xui/xuimultidim/XUiMultiDimSingleCopyRoleRoom.lua

41 lines
No EOL
1.3 KiB
Lua
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

local XUiBattleRoleRoomDefaultProxy = require("XUi/XUiNewRoomSingle/XUiBattleRoleRoomDefaultProxy")
local XUiMultiDimSingleCopyRoleRoom = XClass(XUiBattleRoleRoomDefaultProxy, "XUiMultiDimSingleCopyRoleRoom")
-- 多维挑战 单人副本
local MaxCharacterCount = 1
function XUiMultiDimSingleCopyRoleRoom:Ctor(team, stageId)
self.Team = team
self.StageId = stageId
end
function XUiMultiDimSingleCopyRoleRoom:CheckIsCanDrag()
return false
end
-- 检查是否能战斗单人挑战副本只能上阵1人
function XUiMultiDimSingleCopyRoleRoom:GetIsCanEnterFight()
local curTeamMemberCount = 0
if not self.Team then return end
for _, charId in ipairs(self.Team.EntitiyIds) do
if charId > 0 then
curTeamMemberCount = curTeamMemberCount + 1
end
end
if curTeamMemberCount > MaxCharacterCount then
local text = XUiHelper.GetText("TeamNeedCount", MaxCharacterCount)
XUiManager.TipMsg(text)
return false
end
return true
end
function XUiMultiDimSingleCopyRoleRoom:AOPOnStartAfter(rootUi)
rootUi.BtnTeamPrefab.gameObject:SetActive(false)
rootUi.PanelFirstInfo.gameObject:SetActive(false)
rootUi.BtnChar2.gameObject:SetActive(false)
rootUi.BtnChar3.gameObject:SetActive(false)
end
return XUiMultiDimSingleCopyRoleRoom