神兵提交
parent
24ad78e8da
commit
10fee38b64
File diff suppressed because it is too large
Load Diff
|
|
@ -6,7 +6,7 @@ local shenBingConfig = ConfigManager.GetConfig(ConfigName.ShenBing)
|
|||
local TabBox = require("Modules/Common/TabBox")
|
||||
local _TabData={
|
||||
[1] = { default = "r_hero_xuanze_002", select = "r_hero_xuanze_001", name = Language[10201] },
|
||||
[2] = { default = "r_hero_xuanze_002", select = "r_hero_xuanze_001", name = "神兵" },
|
||||
--[2] = { default = "r_hero_xuanze_002", select = "r_hero_xuanze_001", name = "神兵" },
|
||||
}
|
||||
local _TabFontColor = { default = Color.New(130 / 255, 128 / 255, 120 / 255, 1),
|
||||
select = Color.New(243 / 255, 235 / 255, 202 / 255, 1)}
|
||||
|
|
@ -20,7 +20,7 @@ local redPointList = {}
|
|||
function this:InitComponent(gameObject)
|
||||
this.spLoader = SpriteLoader.New()
|
||||
this.ChipItemList={}--存储itemview 重复利用
|
||||
Util.GetGameObject(gameObject, "GodWeaponListPanel_List/name"):GetComponent("Text").text = Language[11447]
|
||||
Util.GetGameObject(gameObject, "GodWeaponListPanel_List/name"):GetComponent("Text").text = "神兵列表"
|
||||
this.tabBox = Util.GetGameObject(gameObject, "GodWeaponListPanel_List/TabBox")
|
||||
|
||||
this.ScrollParentView1 = Util.GetGameObject(gameObject, "GodWeaponListPanel_List/ScrollParentView1")
|
||||
|
|
@ -53,11 +53,11 @@ end
|
|||
|
||||
function this:AddListener()
|
||||
|
||||
Game.GlobalEvent:AddEvent(GameEvent.Pokemon.PokemonCompound, this.OnClickTabBtn,2)
|
||||
Game.GlobalEvent:AddEvent(GameEvent.Pokemon.PokemonCompound, this.OnClickTabBtn,1)
|
||||
end
|
||||
|
||||
function this:RemoveListener()
|
||||
Game.GlobalEvent:RemoveEvent(GameEvent.Pokemon.PokemonCompound,this.OnClickTabBtn,2)
|
||||
Game.GlobalEvent:RemoveEvent(GameEvent.Pokemon.PokemonCompound,this.OnClickTabBtn,1)
|
||||
end
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -98,7 +98,19 @@ function this.GetCanUpZhenWeapons()
|
|||
return curAllPokemonList
|
||||
end
|
||||
|
||||
|
||||
function this.GetNoUpZhenWeapons()
|
||||
local list={}
|
||||
for i = 1, #allGodWeapons do
|
||||
LogError("allGodWeapons[i].point=="..allGodWeapons[i].point)
|
||||
|
||||
end
|
||||
for key, value in pairs(allGodWeapons) do
|
||||
if value.point==0 then
|
||||
table.insert(list,value)
|
||||
end
|
||||
end
|
||||
return list
|
||||
end
|
||||
|
||||
|
||||
--碎片可以合成红点
|
||||
|
|
|
|||
|
|
@ -7191,7 +7191,18 @@ function NetManager.RequestMagicSoldierStrong(_id,_type,_target,_func)
|
|||
end)
|
||||
end
|
||||
|
||||
|
||||
--上阵交换位置
|
||||
function NetManager.RequestMagicSoldierExchange(_id1,id2,_func)
|
||||
local data = PlayerInfoProto_pb.magicSoldierExchangeRequest()
|
||||
data.id=_id1
|
||||
data.id2=id2
|
||||
local msg = data:SerializeToString()
|
||||
Network:SendMessageWithCallBack(MessageTypeProto_pb.MAGIC_SOLDIER_EXCHANGE_REQUEST,MessageTypeProto_pb.MAGIC_SOLDIER_EXCHANGE_RESPONSE,msg,function(buffer)
|
||||
if _func then
|
||||
_func(msg)
|
||||
end
|
||||
end)
|
||||
end
|
||||
|
||||
|
||||
return this
|
||||
|
|
@ -165,14 +165,17 @@ function PlayerInfoPopup:InitComponent()
|
|||
this.Demons[i].levelText = Util.GetGameObject(this.Demons[i].hero, "lvbg/levelText"):GetComponent("Text")
|
||||
this.Demons[i].icon = Util.GetGameObject(this.Demons[i].hero, "icon"):GetComponent("Image")
|
||||
end
|
||||
this.Pokemons={}
|
||||
|
||||
Util.GetGameObject(self.transform, "tipImage/panel/pokemonInfo/tip"):GetComponent("Text").text=Language[11501]
|
||||
this.Pokemons = {}
|
||||
for i = 1, 6 do
|
||||
table.insert(this.Pokemons, Util.GetGameObject(self.gameObject, "tipImage/panel/pokemonInfo/Demons/heroPro (" .. i .. ")"))
|
||||
end
|
||||
this.Weapons={}
|
||||
for i = 1, 6 do
|
||||
table.insert(this.Weapons, Util.GetGameObject(self.gameObject, "tipImage/panel/weaponInfo/Demons/heroPro (" .. i .. ")"))
|
||||
end
|
||||
this.pokemonObj=Util.GetGameObject(self.transform, "tipImage/panel/pokemonInfo").gameObject
|
||||
this.weaponInfo=Util.GetGameObject(self.transform, "tipImage/panel/weaponInfo")
|
||||
this.boxLine = Util.GetGameObject(self.transform, "tipImage/panel/defendbox/line")
|
||||
this.btnBox = Util.GetGameObject(self.transform, "tipImage/panel/box")
|
||||
-- this.bgImg= Util.GetGameObject(self.transform, "tipImage/tipImage"):GetComponent("RectTransform")
|
||||
|
|
@ -469,6 +472,38 @@ function this.FormationAdapter(teamInfo)
|
|||
end
|
||||
end
|
||||
|
||||
--====================队伍神兵信息======================
|
||||
local len2=#teamInfo.MagicSoldier
|
||||
-- LogError("长度:"..len)
|
||||
if len2>0 then
|
||||
this.weaponInfo:SetActive(true)
|
||||
for i, demon in ipairs(this.Weapons) do
|
||||
--demon.gameObject:SetActive(false)
|
||||
Util.GetGameObject(demon, "frame"):GetComponent("Image").sprite = this.spLoader:LoadSprite(GetQuantityImageByquality(1))
|
||||
Util.GetGameObject(demon, "hero"):SetActive(false)
|
||||
end
|
||||
else
|
||||
this.weaponInfo:SetActive(false)
|
||||
end
|
||||
for i, hero in ipairs(teamInfo.MagicSoldier) do
|
||||
local demonId = teamInfo.MagicSoldier[i].heroTid
|
||||
--this.Weapons[].gameObject:SetActive(true)
|
||||
if demonId then
|
||||
local heroGo = Util.GetGameObject(this.Weapons[hero.position], "hero")
|
||||
heroGo:SetActive(true)
|
||||
SetHeroStars(this.spLoader, Util.GetGameObject(heroGo, "starGrid"), hero.star)
|
||||
local heroConfig = ConfigManager.GetConfigData(ConfigName.ShenBing, demonId)
|
||||
Util.GetGameObject(heroGo, "lvbg/levelText"):GetComponent("Text").text = hero.level
|
||||
Util.GetGameObject(this.Weapons[hero.position], "frame"):GetComponent("Image").sprite = this.spLoader:LoadSprite(GetQuantityImageByquality(heroConfig.Quality))
|
||||
Util.GetGameObject(heroGo, "icon"):GetComponent("Image").sprite = this.spLoader:LoadSprite(GetResourcePath(heroConfig.Icon))
|
||||
local frameBtn = Util.GetGameObject(this.Weapons[i], "frame")
|
||||
local heroData = {}
|
||||
Util.AddOnceClick(frameBtn, function()
|
||||
--local pokemonData={tempId=demonId,id=demonId,star=hero.star,level=hero.level}
|
||||
--UIManager.OpenPanel(UIName.PokemonGetInfoPopup,true,pokemonData)
|
||||
end)
|
||||
end
|
||||
end
|
||||
--====================其他信息按钮显示======================
|
||||
this.infoIndex = 0
|
||||
for index, value in ipairs(InfoBtns) do
|
||||
|
|
|
|||
|
|
@ -210,7 +210,7 @@ function this.SortTypeClick(_sort,_sortType,isTop,isAni)
|
|||
selectHeroData={}
|
||||
--所有灵兽数据
|
||||
local items={}
|
||||
local heros=GodWeaponManager.GetCanUpZhenWeapons()
|
||||
local heros=GodWeaponManager.GetNoUpZhenWeapons()
|
||||
if heros then
|
||||
for i, v in pairs(heros) do
|
||||
local hero={}
|
||||
|
|
|
|||
Loading…
Reference in New Issue