fix bug
This commit is contained in:
parent
b98475ed40
commit
eec5738408
@ -47,9 +47,12 @@ function HeroCell:refresh(heroEntity, isGray)
|
||||
local canLvUp = heroEntity:canLvUp()
|
||||
local canStarUp = heroEntity:canStarUp()
|
||||
local inTeam = DataManager.HeroData:isInStageFormation(heroEntity:getCfgId())
|
||||
if (canLvUp and inTeam) or canStarUp then
|
||||
if canLvUp and inTeam then
|
||||
self.lvUpArrow:setActive(true)
|
||||
self.lvUpArrow:playAnim("animation", true, false)
|
||||
self.lvUpArrow:playAnim("lv", true, false)
|
||||
elseif canStarUp then
|
||||
self.lvUpArrow:setActive(true)
|
||||
self.lvUpArrow:playAnim("star", true, false)
|
||||
else
|
||||
self.lvUpArrow:setActive(false)
|
||||
end
|
||||
|
||||
@ -312,7 +312,7 @@ function HeroComp:onClickHero(cell, heroId)
|
||||
local targetPos = cell:getBaseObject():getTransform().position
|
||||
local sPoint = UIManager:getUICameraComponent():WorldToScreenPoint(targetPos)
|
||||
targetPos = CS.BF.Utils.RectTransformScreenPointToLocalPointInRectangle(self.content:getTransform(), sPoint.x, sPoint.y, UIManager:getUICameraComponent())
|
||||
self.largeHeroCell:getBaseObject():setAnchoredPosition(targetPos.x, targetPos.y)
|
||||
self.largeHeroCell:getBaseObject():setAnchoredPosition(targetPos.x, targetPos.y + 113)
|
||||
self.largeHeroCell:getBaseObject():getTransform():SetAsLastSibling()
|
||||
self.largeHeroCell:refresh(entity, not entity:isActived(), self.onClickUseFunc, self.battleType)
|
||||
self.largeHeroCell:showCheck(self.curFormation[entity:getMatchType()] == heroId)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user