【玉虚论道】我的编队界面
parent
391c538ceb
commit
6345a18ebe
|
@ -1785,6 +1785,9 @@ FormationTypeDef = {
|
||||||
FIGHT_LEVEL = 1701, --山河社稷图主关卡编队
|
FIGHT_LEVEL = 1701, --山河社稷图主关卡编队
|
||||||
FIGHT_ASSISTANTLEVEL = 1801, --山河社稷图副主关卡编队
|
FIGHT_ASSISTANTLEVEL = 1801, --山河社稷图副主关卡编队
|
||||||
FORMATION_TSLX = 1901, --踏碎凌霄编队 没有实际意义后端做特殊操作 其实就是主线编队
|
FORMATION_TSLX = 1901, --踏碎凌霄编队 没有实际意义后端做特殊操作 其实就是主线编队
|
||||||
|
FORMATION_YUXUNLUNDAO1 = 2001, --玉虚论道1队
|
||||||
|
FORMATION_YUXUNLUNDAO2 = 2002, --玉虚论道2队
|
||||||
|
FORMATION_YUXUNLUNDAO3 = 2003, --玉虚论道3队
|
||||||
}
|
}
|
||||||
|
|
||||||
--编队需要拉取主线
|
--编队需要拉取主线
|
||||||
|
|
|
@ -42,7 +42,13 @@ function this.MakeAEmptyTeam(teamId)
|
||||||
elseif teamId == FormationTypeDef.FIGHT_LEVEL then
|
elseif teamId == FormationTypeDef.FIGHT_LEVEL then
|
||||||
oTeam.teamName = "山河社稷图"-- 1701
|
oTeam.teamName = "山河社稷图"-- 1701
|
||||||
elseif teamId == FormationTypeDef.FIGHT_ASSISTANTLEVEL then
|
elseif teamId == FormationTypeDef.FIGHT_ASSISTANTLEVEL then
|
||||||
oTeam.teamName = "山河社稷图"-- 1701
|
oTeam.teamName = "山河社稷图"-- 1801
|
||||||
|
-- elseif teamId == FormationTypeDef.FORMATION_YUXUNLUNDAO1 then
|
||||||
|
-- oTeam.teamName = "玉虚论道1队"-- 2001
|
||||||
|
-- elseif teamId == FormationTypeDef.FORMATION_YUXUNLUNDAO2 then
|
||||||
|
-- oTeam.teamName = "玉虚论道2队"-- 2002
|
||||||
|
-- elseif teamId == FormationTypeDef.FORMATION_YUXUNLUNDAO3 then
|
||||||
|
-- oTeam.teamName = "玉虚论道3队"-- 2003
|
||||||
end
|
end
|
||||||
oTeam.teamHeroInfos = {}
|
oTeam.teamHeroInfos = {}
|
||||||
oTeam.teamPokemonInfos = {}
|
oTeam.teamPokemonInfos = {}
|
||||||
|
|
|
@ -34,6 +34,11 @@ local function OnEndDrag(self, Pointgo, data)
|
||||||
local curInfo = self.tempInfo.transform:GetChild(0)
|
local curInfo = self.tempInfo.transform:GetChild(0)
|
||||||
curInfo:SetParent(obj.transform)
|
curInfo:SetParent(obj.transform)
|
||||||
curInfo.localPosition = Vector3.zero
|
curInfo.localPosition = Vector3.zero
|
||||||
|
|
||||||
|
for i = 1, 3 do
|
||||||
|
self.InfoList[i] = Util.GetGameObject(self.Content, "Grid ("..i..")/Info")
|
||||||
|
WorldArenaMyTeamPanel:Refresh()
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function WorldArenaMyTeamPanel:InitComponent()
|
function WorldArenaMyTeamPanel:InitComponent()
|
||||||
|
@ -60,6 +65,13 @@ function WorldArenaMyTeamPanel:InitComponent()
|
||||||
self.triggerList[i].onDrag = self.triggerList[i].onDrag + self.OnDrag
|
self.triggerList[i].onDrag = self.triggerList[i].onDrag + self.OnDrag
|
||||||
self.triggerList[i].onEndDrag = self.triggerList[i].onEndDrag + self.OnEndDrag
|
self.triggerList[i].onEndDrag = self.triggerList[i].onEndDrag + self.OnEndDrag
|
||||||
end
|
end
|
||||||
|
self.Heros = {}
|
||||||
|
for i = 1, 3 do
|
||||||
|
self.Heros[i] = {}
|
||||||
|
for j = 1, 6 do
|
||||||
|
self.Heros[i][j] = Util.GetGameObject(self.Content, "Grid ("..i..")/Info/TeamList/heroPro ("..j..")")
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
@ -91,8 +103,56 @@ function WorldArenaMyTeamPanel:OnShow()
|
||||||
end
|
end
|
||||||
|
|
||||||
function WorldArenaMyTeamPanel:Refresh()
|
function WorldArenaMyTeamPanel:Refresh()
|
||||||
|
NetManager.RequestPlayerInfo(self.playerId, PLAYER_INFO_VIEW_TYPE.NORMAL,1, function(msg)
|
||||||
|
for i = 1, 3 do
|
||||||
|
WorldArenaMyTeamPanel:SetSingleFormation(self.InfoList[i],msg.teamInfo.team,i)
|
||||||
|
end
|
||||||
|
end)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function WorldArenaMyTeamPanel:SetSingleFormation(go,data,index)
|
||||||
|
local title = Util.GetGameObject(go,"Title"):GetComponent("Text")
|
||||||
|
local warPower = Util.GetGameObject(go,"WarPower/Text"):GetComponent("Text")
|
||||||
|
local btnChange = Util.GetGameObject(go,"ChangeTeam")
|
||||||
|
local teamList = Util.GetGameObject(go,"TeamList")
|
||||||
|
title.text = string.format( "第%s队",NumToChinese[index])
|
||||||
|
warPower.text = data.totalForce
|
||||||
|
Util.AddOnceClick(btnChange,function ()
|
||||||
|
PopupTipPanel.ShowTip(string.format( "进入第%s个编队",index))
|
||||||
|
end)
|
||||||
|
|
||||||
|
for i, demon in ipairs(self.Heros[index]) do
|
||||||
|
Util.GetGameObject(demon, "frame"):GetComponent("Image").sprite = self.spLoader:LoadSprite(GetQuantityImageByquality(1))
|
||||||
|
Util.GetGameObject(demon, "hero"):SetActive(false)
|
||||||
|
end
|
||||||
|
--队伍阵容
|
||||||
|
for i, hero in ipairs(data.team) do
|
||||||
|
local heroTid = data.team[i].heroTid
|
||||||
|
if heroTid then
|
||||||
|
local heroGo = Util.GetGameObject(self.Heros[index][hero.position], "hero")
|
||||||
|
heroGo:SetActive(true)
|
||||||
|
SetHeroStars(self.spLoader, Util.GetGameObject(heroGo, "starGrid"), hero.star)
|
||||||
|
local heroConfig = ConfigManager.GetConfigData(ConfigName.HeroConfig, heroTid)
|
||||||
|
Util.GetGameObject(heroGo, "proIcon"):GetComponent("Image").sprite = self.spLoader:LoadSprite(GetProStrImageByProNum(heroConfig.PropertyName))
|
||||||
|
Util.GetGameObject(heroGo, "lvbg/levelText"):GetComponent("Text").text = hero.level
|
||||||
|
Util.GetGameObject(self.Heros[index][hero.position], "frame"):GetComponent("Image").sprite = self.spLoader:LoadSprite(GetQuantityImageByquality(heroConfig.Quality, hero.star))
|
||||||
|
SetHeroIcon(self.spLoader, hero,Util.GetGameObject(heroGo, "icon"):GetComponent("Image"),heroConfig)
|
||||||
|
local frameBtn = Util.GetGameObject(self.Heros[index][hero.position], "frame")
|
||||||
|
local heroData = {}
|
||||||
|
Util.AddOnceClick(frameBtn, function()
|
||||||
|
NetManager.ViewHeroInfoRequest(self.playerId,hero.heroid,1,PLAYER_INFO_VIEW_TYPE.NORMAL,function(msg)
|
||||||
|
if not hero.heroid then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
heroData= GoodFriendManager.GetHeroDatas(msg.hero,msg.force,msg.SpecialEffects,msg.guildSkill)
|
||||||
|
GoodFriendManager.InitEquipData(msg.equip,heroData)
|
||||||
|
UIManager.OpenPanel(UIName.RoleInfoPopup, heroData,true)
|
||||||
|
end)
|
||||||
|
end)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
function WorldArenaMyTeamPanel:OnClose()
|
function WorldArenaMyTeamPanel:OnClose()
|
||||||
end
|
end
|
||||||
|
@ -100,6 +160,11 @@ end
|
||||||
--界面销毁时调用(用于子类重写)
|
--界面销毁时调用(用于子类重写)
|
||||||
function WorldArenaMyTeamPanel:OnDestroy()
|
function WorldArenaMyTeamPanel:OnDestroy()
|
||||||
self.spLoader:Destroy()
|
self.spLoader:Destroy()
|
||||||
|
self.InfoList = {}
|
||||||
|
self.dragViewList = {}
|
||||||
|
self.triggerList = {}
|
||||||
|
self.gridList = {}
|
||||||
|
self.Heros = {}
|
||||||
end
|
end
|
||||||
|
|
||||||
return WorldArenaMyTeamPanel
|
return WorldArenaMyTeamPanel
|
Loading…
Reference in New Issue