挂机多人开启条件添加

dev_chengFeng
jiaoyangna 2021-04-15 21:05:27 +08:00
parent 3738137554
commit 5f9144f4e5
2 changed files with 19 additions and 14 deletions

View File

@ -1358,6 +1358,7 @@ FUNCTION_OPEN_TYPE = {
HongMengZhen = 86, -- 鸿蒙阵
hunyin = 87, -- 魂印
tianshumijuan = 88,--天书秘卷
guajigongneng = 89,--挂机多人
}
TaskGetBtnIconDef = {

View File

@ -115,20 +115,24 @@ function this:Init()
local tempconfig = ConfigManager.GetConfigData(ConfigName.ChallengeMapConfig,m_curMapId)
if not this.playerViews[0] then
--LogGreen(m_curMapId)
local randomNum = math.random(2, 4)
PlayerManager.GetFightMapPlayerNPCData(randomNum,function(NPCList)
--LogGreen("NPCList:"..LengthOfTable(NPCList))
local index = 1
for k,v in pairs(NPCList) do
local index1 = math.random(6,12)
local index2 = math.random(19,38)
local index3 = math.random(1,2)
local index4 = math.random(2,19)
this.playerViews[index] = SubUIManager.Open(SubUIConfig.SingleFightPlayerView,this.mapRoot.transform,this)
this.playerViews[index]:SetData((index3 == 1 and index1 or index2),index4,false,v)
index = index + 1
end
end)
if ActTimeCtrlManager.SingleFuncState(FUNCTION_OPEN_TYPE.guajigongneng) then
iconNum = 9
local randomNum = math.random(2, 4)
PlayerManager.GetFightMapPlayerNPCData(randomNum,function(NPCList)
--LogGreen("NPCList:"..LengthOfTable(NPCList))
local index = 1
for k,v in pairs(NPCList) do
local index1 = math.random(6,12)
local index2 = math.random(19,38)
local index3 = math.random(1,2)
local index4 = math.random(2,19)
this.playerViews[index] = SubUIManager.Open(SubUIConfig.SingleFightPlayerView,this.mapRoot.transform,this)
this.playerViews[index]:SetData((index3 == 1 and index1 or index2),index4,false,v)
index = index + 1
end
end)
end
iconNum = 4
this.playerViews[0] = SubUIManager.Open(SubUIConfig.SingleFightPlayerView,this.mapRoot.transform,this)
this.playerViews[0]:SetData(startUV[m_curMapId].u,startUV[m_curMapId].v,true)
end