Merge branch 'master_develop' of http://60.1.1.230/gaoxin/JL_Client into master_develop

jiaoyangna 2020-10-29 10:13:11 +08:00
commit 11d0d95bde
16 changed files with 5940 additions and 5870 deletions

View File

@ -126,7 +126,7 @@ GameObject:
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 0
m_IsActive: 1
--- !u!224 &224115785939912884
RectTransform:
m_ObjectHideFlags: 0
@ -4828,7 +4828,7 @@ ParticleSystem:
--- !u!199 &199130457302089272
ParticleSystemRenderer:
serializedVersion: 6
m_ObjectHideFlags: 0
m_ObjectHideFlags: 2
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
@ -9897,7 +9897,7 @@ ParticleSystem:
--- !u!199 &199762737609823424
ParticleSystemRenderer:
serializedVersion: 6
m_ObjectHideFlags: 0
m_ObjectHideFlags: 2
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
@ -14544,7 +14544,7 @@ ParticleSystem:
--- !u!199 &199080318784643404
ParticleSystemRenderer:
serializedVersion: 6
m_ObjectHideFlags: 0
m_ObjectHideFlags: 2
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
@ -19420,7 +19420,7 @@ ParticleSystem:
--- !u!199 &199703938132574080
ParticleSystemRenderer:
serializedVersion: 6
m_ObjectHideFlags: 0
m_ObjectHideFlags: 2
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
@ -24234,7 +24234,7 @@ ParticleSystem:
--- !u!199 &199260698072189912
ParticleSystemRenderer:
serializedVersion: 6
m_ObjectHideFlags: 0
m_ObjectHideFlags: 2
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
@ -29360,7 +29360,7 @@ ParticleSystem:
--- !u!199 &199218959580742590
ParticleSystemRenderer:
serializedVersion: 6
m_ObjectHideFlags: 0
m_ObjectHideFlags: 2
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
@ -34274,7 +34274,7 @@ ParticleSystem:
--- !u!199 &199817266957694956
ParticleSystemRenderer:
serializedVersion: 6
m_ObjectHideFlags: 0
m_ObjectHideFlags: 2
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}

View File

@ -4968,7 +4968,7 @@ ParticleSystem:
--- !u!199 &199244119203112348
ParticleSystemRenderer:
serializedVersion: 6
m_ObjectHideFlags: 0
m_ObjectHideFlags: 2
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
@ -10461,7 +10461,7 @@ ParticleSystem:
--- !u!199 &199792808770953112
ParticleSystemRenderer:
serializedVersion: 6
m_ObjectHideFlags: 0
m_ObjectHideFlags: 2
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
@ -15340,7 +15340,7 @@ ParticleSystem:
--- !u!199 &199794337862796524
ParticleSystemRenderer:
serializedVersion: 6
m_ObjectHideFlags: 0
m_ObjectHideFlags: 2
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
@ -20257,7 +20257,7 @@ ParticleSystem:
--- !u!199 &199523818938226048
ParticleSystemRenderer:
serializedVersion: 6
m_ObjectHideFlags: 0
m_ObjectHideFlags: 2
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
@ -25165,7 +25165,7 @@ ParticleSystem:
--- !u!199 &199911596257148998
ParticleSystemRenderer:
serializedVersion: 6
m_ObjectHideFlags: 0
m_ObjectHideFlags: 2
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
@ -30281,7 +30281,7 @@ ParticleSystem:
--- !u!199 &199985042618264852
ParticleSystemRenderer:
serializedVersion: 6
m_ObjectHideFlags: 0
m_ObjectHideFlags: 2
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
@ -35120,7 +35120,7 @@ ParticleSystem:
--- !u!199 &199432607171239872
ParticleSystemRenderer:
serializedVersion: 6
m_ObjectHideFlags: 0
m_ObjectHideFlags: 2
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
@ -39885,7 +39885,7 @@ ParticleSystem:
--- !u!199 &199533659340483552
ParticleSystemRenderer:
serializedVersion: 6
m_ObjectHideFlags: 0
m_ObjectHideFlags: 2
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
@ -44805,7 +44805,7 @@ ParticleSystem:
--- !u!199 &199621787209501796
ParticleSystemRenderer:
serializedVersion: 6
m_ObjectHideFlags: 0
m_ObjectHideFlags: 2
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
@ -49645,7 +49645,7 @@ ParticleSystem:
--- !u!199 &199833373325779906
ParticleSystemRenderer:
serializedVersion: 6
m_ObjectHideFlags: 0
m_ObjectHideFlags: 2
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
@ -54410,7 +54410,7 @@ ParticleSystem:
--- !u!199 &199105369059012342
ParticleSystemRenderer:
serializedVersion: 6
m_ObjectHideFlags: 0
m_ObjectHideFlags: 2
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
@ -59368,7 +59368,7 @@ ParticleSystem:
--- !u!199 &199307337939030274
ParticleSystemRenderer:
serializedVersion: 6
m_ObjectHideFlags: 0
m_ObjectHideFlags: 2
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
@ -64568,7 +64568,7 @@ ParticleSystem:
--- !u!199 &199630142152782450
ParticleSystemRenderer:
serializedVersion: 6
m_ObjectHideFlags: 0
m_ObjectHideFlags: 2
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
@ -69709,7 +69709,7 @@ ParticleSystem:
--- !u!199 &199908372348331668
ParticleSystemRenderer:
serializedVersion: 6
m_ObjectHideFlags: 0
m_ObjectHideFlags: 2
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
@ -74592,7 +74592,7 @@ ParticleSystem:
--- !u!199 &199168215033545836
ParticleSystemRenderer:
serializedVersion: 6
m_ObjectHideFlags: 0
m_ObjectHideFlags: 2
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
@ -79164,7 +79164,7 @@ ParticleSystem:
--- !u!199 &199843962628019544
ParticleSystemRenderer:
serializedVersion: 6
m_ObjectHideFlags: 0
m_ObjectHideFlags: 2
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
@ -84097,7 +84097,7 @@ ParticleSystem:
--- !u!199 &199509460733080424
ParticleSystemRenderer:
serializedVersion: 6
m_ObjectHideFlags: 0
m_ObjectHideFlags: 2
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
@ -89002,7 +89002,7 @@ ParticleSystem:
--- !u!199 &199860908945259958
ParticleSystemRenderer:
serializedVersion: 6
m_ObjectHideFlags: 0
m_ObjectHideFlags: 2
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
@ -93842,7 +93842,7 @@ ParticleSystem:
--- !u!199 &199711737729748198
ParticleSystemRenderer:
serializedVersion: 6
m_ObjectHideFlags: 0
m_ObjectHideFlags: 2
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
@ -98731,7 +98731,7 @@ ParticleSystem:
--- !u!199 &199211786817537030
ParticleSystemRenderer:
serializedVersion: 6
m_ObjectHideFlags: 0
m_ObjectHideFlags: 2
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
@ -103570,7 +103570,7 @@ ParticleSystem:
--- !u!199 &199370084343575042
ParticleSystemRenderer:
serializedVersion: 6
m_ObjectHideFlags: 0
m_ObjectHideFlags: 2
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
@ -108335,7 +108335,7 @@ ParticleSystem:
--- !u!199 &199279108654796608
ParticleSystemRenderer:
serializedVersion: 6
m_ObjectHideFlags: 0
m_ObjectHideFlags: 2
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
@ -113323,7 +113323,7 @@ ParticleSystem:
--- !u!199 &199618116003462224
ParticleSystemRenderer:
serializedVersion: 6
m_ObjectHideFlags: 0
m_ObjectHideFlags: 2
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
@ -113499,7 +113499,7 @@ GameObject:
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 0
m_IsActive: 1
--- !u!224 &224824825465641792
RectTransform:
m_ObjectHideFlags: 0
@ -118384,7 +118384,7 @@ ParticleSystem:
--- !u!199 &199156070400067654
ParticleSystemRenderer:
serializedVersion: 6
m_ObjectHideFlags: 0
m_ObjectHideFlags: 2
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
@ -123226,7 +123226,7 @@ ParticleSystem:
--- !u!199 &199370675453577378
ParticleSystemRenderer:
serializedVersion: 6
m_ObjectHideFlags: 0
m_ObjectHideFlags: 2
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
@ -128342,7 +128342,7 @@ ParticleSystem:
--- !u!199 &199859284564772838
ParticleSystemRenderer:
serializedVersion: 6
m_ObjectHideFlags: 0
m_ObjectHideFlags: 2
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
@ -134139,7 +134139,7 @@ ParticleSystem:
--- !u!199 &199831199738470310
ParticleSystemRenderer:
serializedVersion: 6
m_ObjectHideFlags: 0
m_ObjectHideFlags: 2
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}

View File

@ -403,7 +403,8 @@ GameEvent = {
},
Pokemon={
PokemonCompound="Pokemon.PokemonCompound",
PokemonUpZhenRefresh="Pokemon.PokemonUpZhenRefresh"
PokemonUpZhenRefresh="Pokemon.PokemonUpZhenRefresh",
PokemonMainPanelRefresh="Pokemon.PokemonMainPanelRefresh",
},
DynamicTask={
OnMissionChange = "DynamicTask.MissionChange",

View File

@ -728,16 +728,16 @@ function this.GetTableByBackDropData(drop)
if drop.pokemon ~= nil and #drop.pokemon > 0 then
Log("drop.pokemon " .. #drop.pokemon)
for i = 1, #drop.pokemon do
local itemdata = {}
itemdata.itemType = 6
local itemdata = {}
itemdata.sId = drop.pokemon[i].tempId
itemdata.backData = drop.pokemon[i]
itemdata.configData = ConfigManager.GetConfigData(ConfigName.SpiritAnimal, drop.pokemon[i].tempId)
local itemConfig = itemConfig[drop.pokemon[i].tempId]
itemdata.name = itemConfig.ReadingName
itemdata.config=itemConfig
itemdata.frame = GetHeroQuantityImageByquality(itemConfig.ResourceID)
itemdata.icon ="r_jieling_fl_3008_SkillStarGem" -- GetResourcePath(itemConfig.Icon)
itemdata.config=itemConfig
itemdata.itemType = itemConfig.ItemType
itemdata.frame = GetHeroQuantityImageByquality(itemConfig.Quantity)
itemdata.icon = GetResourcePath(itemConfig.ResourceID)
itemdata.num = 1
table.insert(itemDataList, itemdata)
PokemonManager.UpdatePokemonDatas(itemdata.backData,true)

View File

@ -4601,6 +4601,7 @@ function this.PokemonFreeRequest(pokemonIds,chipId,chipNum, func)
Network:SendMessageWithCallBack(MessageTypeProto_pb.POKEMON_FREE_REQUEST, MessageTypeProto_pb.POKEMON_FREE_RESPONSE, msg, function(buffer)
local data = buffer:DataByte()
local msg = HeroInfoProto_pb.PokemonFreeResponse()
msg:ParseFromString(data)
if func then
func(msg)
end

View File

@ -60,6 +60,7 @@ function PokemonGetInfoPopup:OnShow()
end
function this.GetShowPanelData()
local pokemonSData=ConfigManager.GetConfigData(ConfigName.SpiritAnimal, pokemonBackData.tempId)
this.heroName.text = pokemonSData.Name
this.ShowPokemonLive(pokemonSData)
--星级
SetHeroStars(this.starGrid, pokemonBackData.star,2,Vector2.New(60,60),-11.92,Vector2.New(0.5,0.5))
@ -69,11 +70,20 @@ function this.GetShowPanelData()
Util.GetGameObject(proList[0].transform,"proName"):GetComponent("Text").text ="等级"
Util.GetGameObject(proList[0].transform,"proValue"):GetComponent("Text").text = pokemonBackData.level
Util.GetGameObject(proList[0].transform,"Image"):GetComponent("Image").sprite = Util.LoadSprite(PropertyTypeIconDef[1])
for i = 1, 4 do
Util.GetGameObject(proList[i].transform,"proName"):GetComponent("Text").text = ConfigManager.GetConfigData(ConfigName.PropertyConfig,i).Info
Util.GetGameObject(proList[i].transform,"proValue"):GetComponent("Text").text = allAddProVal[i]
Util.GetGameObject(proList[i].transform,"Image"):GetComponent("Image").sprite = Util.LoadSprite(PropertyTypeIconDef[i + 1])
local index = 0
for key, value in pairs(allAddProVal) do
index = index + 1
if proList[index] then
Util.GetGameObject(proList[index].transform,"proName"):GetComponent("Text").text = ConfigManager.GetConfigData(ConfigName.PropertyConfig,key).Info
Util.GetGameObject(proList[index].transform,"proValue"):GetComponent("Text").text = value
Util.GetGameObject(proList[index].transform,"Image"):GetComponent("Image").sprite = Util.LoadSprite(PropertyTypeIconDef[index + 1])
end
end
-- for i = 1, 4 do
-- Util.GetGameObject(proList[i].transform,"proName"):GetComponent("Text").text = ConfigManager.GetConfigData(ConfigName.PropertyConfig,i).Info
-- Util.GetGameObject(proList[i].transform,"proValue"):GetComponent("Text").text = allAddProVal[i]
-- Util.GetGameObject(proList[i].transform,"Image"):GetComponent("Image").sprite = Util.LoadSprite(PropertyTypeIconDef[i + 1])
-- end
local curSkillId = 0
local skillArray = ConfigManager.GetConfigData(ConfigName.SpiritAnimal,pokemonBackData.tempId).SkillArray
for i = 1, #skillArray do
@ -94,11 +104,20 @@ function this.NoGetShowPanelData()
--属性
local allAddProVal = PokemonManager.GetSinglePokemonAddProDataBySid(pokemonSid) --this.CalculateHeroAllProValList(heroSData,heroStar,heroStar ~= heroSData.Star)
proList[0]:SetActive(false)
for i = 1, 4 do
Util.GetGameObject(proList[i].transform,"proName"):GetComponent("Text").text = ConfigManager.GetConfigData(ConfigName.PropertyConfig,i).Info
Util.GetGameObject(proList[i].transform,"proValue"):GetComponent("Text").text = allAddProVal[i]
Util.GetGameObject(proList[i].transform,"Image"):GetComponent("Image").sprite = Util.LoadSprite(PropertyTypeIconDef[i + 1])
local index = 0
for key, value in pairs(allAddProVal) do
index = index + 1
if proList[index] then
Util.GetGameObject(proList[index].transform,"proName"):GetComponent("Text").text = ConfigManager.GetConfigData(ConfigName.PropertyConfig,key).Info
Util.GetGameObject(proList[index].transform,"proValue"):GetComponent("Text").text = value
Util.GetGameObject(proList[index].transform,"Image"):GetComponent("Image").sprite = Util.LoadSprite(PropertyTypeIconDef[index + 1])
end
end
-- for i = 1, 4 do
-- Util.GetGameObject(proList[i].transform,"proName"):GetComponent("Text").text = ConfigManager.GetConfigData(ConfigName.PropertyConfig,i).Info
-- Util.GetGameObject(proList[i].transform,"proValue"):GetComponent("Text").text = allAddProVal[i]
-- Util.GetGameObject(proList[i].transform,"Image"):GetComponent("Image").sprite = Util.LoadSprite(PropertyTypeIconDef[i + 1])
-- end
local curSkillId = 0
local skillArray = ConfigManager.GetConfigData(ConfigName.SpiritAnimal,pokemonSid).SkillArray
for i = 1, #skillArray do
@ -113,8 +132,9 @@ function this.NoGetShowPanelData()
end
function this.ShowPokemonLive(_heroSConfigData)
LogPink("_heroSConfigData.Live ".._heroSConfigData.Live)
this.testLiveGO = poolManager:LoadLive(GetResourcePath(_heroSConfigData.Live), this.liveRoot.transform,
Vector3.one * _heroSConfigData.Scale, Vector3.New(_heroSConfigData.Position[1], _heroSConfigData.Position[2], 0))
Vector3.one * _heroSConfigData.Scale * 0.7, Vector3.New(_heroSConfigData.Position[1], _heroSConfigData.Position[2], 0))
local SkeletonGraphic = this.testLiveGO:GetComponent("SkeletonGraphic")
local idle = function() SkeletonGraphic.AnimationState:SetAnimation(0, "idle", true) end
SkeletonGraphic.AnimationState.Complete = SkeletonGraphic.AnimationState.Complete + idle

View File

@ -11,7 +11,7 @@ local pokemonDatas--所有灵兽list信息
local itemConfig = ConfigManager.GetConfig(ConfigName.ItemConfig)
local heroRankupConfig = ConfigManager.GetConfig(ConfigName.HeroRankupConfig)
local propertyConfig = ConfigManager.GetConfig(ConfigName.PropertyConfig)
local index--当前灵兽在 灵兽列表中的索引
local curDataByListIndex--当前灵兽在 灵兽列表中的索引
local allAddProVal={}--所有属性加成值
local isClickLeftOrRightBtn = true--点击左右按钮切换灵兽播放动画状态
local upZhenDidis
@ -144,7 +144,11 @@ function PokemonInfoPanel:BindEvent()
LogError("灵兽"..#msg.drop.pokemon)
PopupTipPanel.ShowTip("涅槃成功!")
UIManager.OpenPanel(UIName.RewardItemPopup,msg.drop,1,function()
PokemonManager.UpdateSinglePokemonData(curPokemonData.dynamicId,1,0)
PokemonManager.UpdateSinglePokemonData(curPokemonData.dynamicId,1,0)
curPokemonData = PokemonManager.GetSinglePokemonData(curPokemonData.dynamicId)
-- this.OnShowData()
-- this.OnShowRedPoint()
this.contents[curIndex].view:OnShow(this,curPokemonData)
end)
end)
end)
@ -247,8 +251,8 @@ end
function this.OnShowData()
isClickLeftOrRightBtn = true
for i = 1, #pokemonDatas do
if curPokemonData == pokemonDatas[i] then
index = i
if curPokemonData.dynamicId == pokemonDatas[i].dynamicId then
curDataByListIndex = i
end
end
this.UpdateLiveList()--加载当前 和 左右数据
@ -293,10 +297,10 @@ end
--更新界面已存数据
function this.UpdateLiveList()
local leftIndex = (index - 1 > 0 and index - 1 or #pokemonDatas)
local leftIndex = (curDataByListIndex - 1 > 0 and curDataByListIndex - 1 or #pokemonDatas)
leftPokemonData = pokemonDatas[leftIndex]
curPokemonData = pokemonDatas[index]
local rightIndex = (index + 1 <= #pokemonDatas and index + 1 or 1)
curPokemonData = pokemonDatas[curDataByListIndex]
local rightIndex = (curDataByListIndex + 1 <= #pokemonDatas and curDataByListIndex + 1 or 1)
rightPokemonData = pokemonDatas[rightIndex]
-- LogPink(leftIndex.." "..index.." "..rightIndex)
end
@ -342,9 +346,9 @@ function this.RightBtnOnClick()
end
isClickLeftOrRightBtn = false
this.rightBtn:GetComponent("Button").enabled = false
local oldIndexConfigData = pokemonDatas[index]
index = (index + 1 <= #pokemonDatas and index + 1 or 1)
curPokemonData = pokemonDatas[index]
local oldIndexConfigData = pokemonDatas[curDataByListIndex]
curDataByListIndex = (curDataByListIndex + 1 <= #pokemonDatas and curDataByListIndex + 1 or 1)
curPokemonData = pokemonDatas[curDataByListIndex]
if this.leftLiveObj then
poolManager:UnLoadLive(leftPokemonData.live, this.leftLiveObj)
this.leftLiveObj = nil
@ -372,9 +376,9 @@ function this.LeftBtnOnClick()
end
isClickLeftOrRightBtn = false
this.leftBtn:GetComponent("Button").enabled = false
local oldIndexConfigData = pokemonDatas[index]
index = (index - 1 > 0 and index - 1 or #pokemonDatas)
curPokemonData = pokemonDatas[index]
local oldIndexConfigData = pokemonDatas[curDataByListIndex]
curDataByListIndex = (curDataByListIndex - 1 > 0 and curDataByListIndex - 1 or #pokemonDatas)
curPokemonData = pokemonDatas[curDataByListIndex]
if this.rightLiveObj then
poolManager:UnLoadLive(rightPokemonData.live, this.rightLiveObj)
this.rightLiveObj = nil

View File

@ -9,6 +9,7 @@ local PokemonDataList = {}
local live2dList = {}
local dragViewListGo={}--dragView预设列表
local pokemonPosLocks = ConfigManager.GetConfigData(ConfigName.SpiritAnimalSetting,1).BlockUnlockLevel
local spiritAnimal = ConfigManager.GetConfig(ConfigName.SpiritAnimal)
local canUpZhenPokemonList = {}
this.trigger = {}
--初始化组件(用于子类重写)
@ -177,14 +178,15 @@ function this.ShowSinglePokemonList(go,singleData,liveIndex)
Util.GetGameObject(go, "upZhenInfo/titleImage/nameText"):GetComponent("Text").text = ConfigManager.GetConfigData(ConfigName.SpiritAnimal,curData.id).Name
Util.GetGameObject(go, "upZhenInfo/lvImage/Text"):GetComponent("Text").text = "等级"..curData.lv
local curPokemonLive = Util.GetGameObject(go, "upZhenInfo/pokemonLive")
if live2dList and #live2dList > 0 then
if live2dList[liveIndex] then
poolManager:UnLoadLive(live2dList[liveIndex].name, live2dList[liveIndex].go, PoolManager.AssetType.GameObject)
live2dList[liveIndex] = nil
for key, value in pairs(live2dList) do
if key == liveIndex then
-- LogPink("live2dList[liveIndex].name "..live2dList[key].name)
poolManager:UnLoadLive(live2dList[key].name, live2dList[key].go, PoolManager.AssetType.GameObject)
live2dList[key] = nil
end
end
local LiveName = curData.live
local live2d = poolManager:LoadLive(LiveName, curPokemonLive.transform,Vector3.one * 0.2, Vector3.New(curData.position[1],curData.position[2],0))--curData.scale
local live2d = poolManager:LoadLive(LiveName, curPokemonLive.transform,Vector3.one *curData.scale * 0.4, Vector3.New(spiritAnimal[curData.id].littleScalePosition[1],spiritAnimal[curData.id].littleScalePosition[2],0))--curData.scale
live2dList[liveIndex] = {name=curData.live, go=live2d}
local starSize = Vector2.New(65,65)
SetHeroStars(Util.GetGameObject(go, "upZhenInfo/starGrid"), curData.star,1,starSize,0,Vector2.New(0.5,0.5))
@ -332,23 +334,16 @@ end
function PokemonMainPanel:OnClose()
ClearRedPointObject(RedPointType.Pokemon_Recruit, this.btnInfoRed)
ClearRedPointObject(RedPointType.Pokemon_Fetter, this.btnFetterRed)
poolManager:UnLoadLive(this.LiveName,this.LiveGO )
this.LiveName= nil
end
--界面销毁时调用(用于子类重写)
function PokemonMainPanel:OnDestroy()
SubUIManager.Close(this.UpView)
dragViewListGo={}
if live2dList and #live2dList > 0 then
for i = 1, #live2dList do
if live2dList[i] then
poolManager:UnLoadLive(live2dList[i].name, live2dList[i].go, PoolManager.AssetType.GameObject)
live2dList[i] = nil
end
end
end
for key, value in pairs(live2dList) do
poolManager:UnLoadLive(live2dList[key].name, live2dList[key].go, PoolManager.AssetType.GameObject)
live2dList[key] = nil
end
end
return PokemonMainPanel

View File

@ -59,11 +59,17 @@ function this.GetSinglePokemonData(_did)
end
--获取所有灵兽数据
function this.GetPokemonDatas()
return pokemons
end
--获取所有灵兽数据
function this.GetPokemonResolveDatas()
local curAllPokemonList = {}
local list=this.GetAllPokemonFormationDids()
for key, value in pairs(pokemons) do
if not value.isZhen then
table.insert(curAllPokemonList,value)
end
if list and not list[value.dynamicId] then
table.insert(curAllPokemonList,value)
end
end
return curAllPokemonList
end

View File

@ -97,13 +97,33 @@ function PokemonUpStarSuccessPanel:OnOpen(_curPokemonData)
local oldLvAllAddProVal = PokemonManager.GetSinglePokemonAddProData(curPokemonData.dynamicId,curPokemonData.star - 1)
--计算面板属性cur
local curLvAllAddProVal = PokemonManager.GetSinglePokemonAddProData(curPokemonData.dynamicId,curPokemonData.star)
for i = 1, 4 do
Util.GetGameObject(curPro[i],"curProName"):GetComponent("Text").text = propertyConfig[i].Info
Util.GetGameObject(curPro[i],"curProVale"):GetComponent("Text").text = oldLvAllAddProVal[i]
Util.GetGameObject(curPro[i],"Image"):GetComponent("Image").sprite = Util.LoadSprite(PropertyTypeIconDef[i])
Util.GetGameObject(nextPro[i],"curProName"):GetComponent("Text").text = propertyConfig[i].Info
Util.GetGameObject(nextPro[i],"curProVale"):GetComponent("Text").text = curLvAllAddProVal[i]
local index = 0
for key, value in pairs(oldLvAllAddProVal) do
index = index + 1
if curPro[index] then
Util.GetGameObject(curPro[index],"curProName"):GetComponent("Text").text = propertyConfig[key].Info
Util.GetGameObject(curPro[index],"curProVale"):GetComponent("Text").text = value
Util.GetGameObject(curPro[index],"Image"):GetComponent("Image").sprite = Util.LoadSprite(PropertyTypeIconDef[index])
end
end
local index2 = 0
for key, value in pairs(curLvAllAddProVal) do
index2 = index2 + 1
if nextPro[index2] then
Util.GetGameObject(nextPro[index2],"curProName"):GetComponent("Text").text = propertyConfig[key].Info
Util.GetGameObject(nextPro[index2],"curProVale"):GetComponent("Text").text = value
end
end
-- for i = 1, 4 do
-- Util.GetGameObject(curPro[i],"curProName"):GetComponent("Text").text = propertyConfig[i].Info
-- Util.GetGameObject(curPro[i],"curProVale"):GetComponent("Text").text = oldLvAllAddProVal[i]
-- Util.GetGameObject(curPro[i],"Image"):GetComponent("Image").sprite = Util.LoadSprite(PropertyTypeIconDef[i])
-- Util.GetGameObject(nextPro[i],"curProName"):GetComponent("Text").text = propertyConfig[i].Info
-- Util.GetGameObject(nextPro[i],"curProVale"):GetComponent("Text").text = curLvAllAddProVal[i]
-- end
local curSkillId = 0
local nextSkillId = 0

View File

@ -83,9 +83,11 @@ this.upLvTrigger.onPointerUp = this.upLvTrigger.onPointerUp + this._onPointerUp
end
function this:AddListener()
-- Game.GlobalEvent:AddEvent(GameEvent.Pokemon.PokemonMainPanelRefresh, this.ShowPokemonInfo)
end
function this:RemoveListener()
-- Game.GlobalEvent:RemoveEvent(GameEvent.Pokemon.PokemonMainPanelRefresh, this.ShowPokemonInfo)
end
local sortingOrder = 0
function this.OnSortingOrderChange(_sortingOrder)
@ -117,7 +119,8 @@ end
function this.ShowPokemonInfo()
--属性
local curAllPro = {}--加上等级
curAllPro[1] = {proName = "等级",proValue = curPokemonData.lv}
local pokemonConFig = ConfigManager.GetConfigData(ConfigName.SpiritAnimal,curPokemonData.id)
curAllPro[1] = {proName = "等级",proValue = curPokemonData.lv.."/"..pokemonConFig.MaxLevel}
local curPro = PokemonManager.GetSinglePokemonAddProData(curPokemonData.dynamicId)
local index = 1
for key, value in pairs(curPro) do
@ -127,13 +130,22 @@ function this.ShowPokemonInfo()
index = index + 1
curAllPro[index] = singleProData
end
for i = 1, #proList do
if PropertyTypeIconDef[i] then
Util.GetGameObject(proList[i], "Image"):GetComponent("Image").sprite = Util.LoadSprite(PropertyTypeIconDef[i])
local index = 0
for key, value in pairs(curAllPro) do
index = index + 1
if proList[index] then
Util.GetGameObject(proList[index], "Image"):GetComponent("Image").sprite = Util.LoadSprite(PropertyTypeIconDef[index])
Util.GetGameObject(proList[index], "proName"):GetComponent("Text").text=curAllPro[key].proName
Util.GetGameObject(proList[index], "proValue"):GetComponent("Text").text=curAllPro[key].proValue
end
Util.GetGameObject(proList[i], "proName"):GetComponent("Text").text=curAllPro[i].proName
Util.GetGameObject(proList[i], "proValue"):GetComponent("Text").text=curAllPro[i].proValue
end
-- for i = 1, #proList do
-- if PropertyTypeIconDef[i] then
-- Util.GetGameObject(proList[i], "Image"):GetComponent("Image").sprite = Util.LoadSprite(PropertyTypeIconDef[i])
-- end
-- Util.GetGameObject(proList[i], "proName"):GetComponent("Text").text=curAllPro[i].proName
-- Util.GetGameObject(proList[i], "proValue"):GetComponent("Text").text=curAllPro[i].proValue
-- end
--技能
local curSkillId = PokemonManager.GetCurStarSkillId(curPokemonData.id,curPokemonData.star)
-- LogPink("curPokemonData.star "..curPokemonData.star)
@ -147,7 +159,6 @@ function this.ShowPokemonInfo()
end)
--升级消耗材料
isMaterial = 0
local pokemonConFig = ConfigManager.GetConfigData(ConfigName.SpiritAnimal,curPokemonData.id)
local upLvConFig = ConfigManager.TryGetConfigDataByDoubleKey(ConfigName.SpiritAnimalLevel,"Quality",pokemonConFig.Quality,"Level",curPokemonData.lv)
isLvEnd = curPokemonData.lv >= pokemonConFig.MaxLevel
this.noUpLvText:SetActive(isLvEnd)

View File

@ -44,9 +44,11 @@ end)
end
function this:AddListener()
-- Game.GlobalEvent:AddEvent(GameEvent.Pokemon.PokemonMainPanelRefresh, this.OnShowData)
end
function this:RemoveListener()
-- Game.GlobalEvent:RemoveEvent(GameEvent.Pokemon.PokemonMainPanelRefresh, this.OnShowData)
end
local sortingOrder = 0

View File

@ -95,6 +95,7 @@ function this.SingleItemDataShow(_go,_itemData)
parent:ClosePanel()
Game.GlobalEvent:DispatchEvent(GameEvent.Pokemon.PokemonUpZhenRefresh)
FormationManager.CheckHeroIdExist()
UIManager.OpenPanel(UIName.PokemonInfoPanel,_itemData,PokemonManager.GetPokemonDatas())
end)
end
else

View File

@ -43,16 +43,25 @@ end
--刷新面板
function this.RefreshPanel()
allProData = PokemonManager.GetPokemonFormationAddPro()
-- local curallProData = PokemonManager.GetPokemonFormationAddPro()
-- HeroManager.DoubleTableCompound(allProData, curallProData)
for i = 1, #allProPre do
local go= allProPre[i]
if PropertyTypeIconDef[i] then
Util.GetGameObject(go, "Image"):GetComponent("Image").sprite = Util.LoadSprite(PropertyTypeIconDef[i])
local index = 0
for key, value in pairs(allProData) do
index = index + 1
local go= allProPre[index]
if go then
Util.GetGameObject(go, "Image"):GetComponent("Image").sprite = Util.LoadSprite(PropertyTypeIconDef[index])
Util.GetGameObject(go,"proName"):GetComponent("Text").text=ConfigManager.GetConfigData(ConfigName.PropertyConfig,key).Info
Util.GetGameObject(go,"proValue"):GetComponent("Text").text= value
end
Util.GetGameObject(go,"proName"):GetComponent("Text").text=ConfigManager.GetConfigData(ConfigName.PropertyConfig,i).Info
Util.GetGameObject(go,"proValue"):GetComponent("Text").text= allProData[i]
end
-- for i = 1, #allProPre do
-- local go= allProPre[i]
-- if PropertyTypeIconDef[i] then
-- Util.GetGameObject(go, "Image"):GetComponent("Image").sprite = Util.LoadSprite(PropertyTypeIconDef[i])
-- end
-- Util.GetGameObject(go,"proName"):GetComponent("Text").text=ConfigManager.GetConfigData(ConfigName.PropertyConfig,i).Info
-- Util.GetGameObject(go,"proValue"):GetComponent("Text").text= allProData[i]
-- end
end
return this

View File

@ -196,7 +196,7 @@ function this.SortTypeClick(_sortType)
selectHeroData={}
--所有灵兽数据
local items={}
local heros=PokemonManager.GetPokemonDatas()
local heros=PokemonManager.GetPokemonResolveDatas()
if heros then
for i, v in pairs(heros) do
local hero={}