【灵兽】bug修改 buffctr 报错修改

wangzhenxing 2020-10-29 11:18:11 +09:00
parent f51fff07fb
commit 09cd47db46
3 changed files with 16 additions and 12 deletions

View File

@ -48,9 +48,10 @@ end
local unitObj
function BuffCtrl.New(unit, buffRoot)
local o = {}
unitObj=unit
setmetatable(o, {__index = BuffCtrl})
o:ctor(unit, buffRoot)
return o
@ -100,7 +101,7 @@ function BuffCtrl:AddBuffEffect(buffName, isTrigger, offset)
local node = BattleManager.LoadAsset(buffName, sortingOrder)
-- node.transform:SetParent(self.RootPanel.transform)
-- node.transform.localScale = Vector3.one
node.transform:SetParent(self.GameObject.transform)
node.transform:SetParent(unitObj.transform)
node.transform.localScale = Vector3.one
node.transform.localPosition = offset and Vector3.New(offset[1], offset[2], 0) or Vector3.zero--self.GameObject.transform.localPosition
self.BuffEffectList[buffName].node = node

View File

@ -15,7 +15,7 @@ function this:InitComponent(gameObject)
this.titleText=Util.GetGameObject(gameObject,"TitleText"):GetComponent("Text")
this.titleText.text="确认放生"
this.infoTxt=Util.GetGameObject(gameObject,"Body/infoText"):GetComponent("Text")
this.cancelBtn=Util.GetGameObject(gameObject,"CancelBtn")
this.cancelBtn=Util.GetGameObject(gameObject,"cancelBtn")
this.confirmBtn=Util.GetGameObject(gameObject,"resetBtn")
this.getInfoTxt=Util.GetGameObject(gameObject,"Body/Text"):GetComponent("Text")
this.getInfoTxt.text="放生后获得"

View File

@ -163,14 +163,16 @@ function this:BindEvent()
LogError("灵兽长度 "..#pokemonIds.."碎片id "..selectChipId.." num"..selectChipNum)
NetManager.PokemonFreeRequest(pokemonIds,selectChipId,selectChipNum,function(msg)
UIManager.OpenPanel(UIName.RewardItemPopup,msg.drop,1,function()
if pokemonIds and #pokemonIds>0 then
PokemonManager.RemovePokemonData(pokemonIds)
else
BagManager.HeroLvUpUpdateItemsNum(selectChipId,selectChipNum)
end
this.SortTypeClick(sortingOrder)
end)
if pokemonIds and #pokemonIds>0 then
PokemonManager.RemovePokemonData(pokemonIds)
-- else
-- LogError("分解前数量"..BagManager.GetItemCountById(selectChipId))
-- BagManager.HeroLvUpUpdateItemsNum(selectChipId,selectChipNum)
-- LogError("分解后数量"..BagManager.GetItemCountById(selectChipId))
end
this.SortTypeClick(sortingOrder)
end)
end)
@ -358,9 +360,10 @@ function this.SingleHeroDataShow(go,_heroData,isGray)
this.selectText.gameObject:SetActive(true)
this.chipObj:SetActive(false)
isPokemon = true
end
end
choosed:SetActive(true)
selectHeroData[heroData.dynamicId]=heroData
choosed:SetActive(true)
this.selectText.text = Language[11775]..LengthOfTable(selectHeroData).."/"..maxSelectNum
end
end)