【引导战斗】修复casting层级错误,修复男女角色显示错误

dev_chengFeng
gaoxin 2021-12-13 17:07:31 +08:00
parent 494181e06c
commit ec916ef6f0
3 changed files with 30 additions and 14 deletions

View File

@ -15,6 +15,7 @@ local orginLayer
--初始化组件(用于子类重写)
function this:InitComponent()
this.spLoader = SpriteLoader.New()
BattleView.oSortingOrder = nil
BattleView:InitComponent(self, self.gameObject)
orginLayer = 0

View File

@ -249,7 +249,12 @@ function MonsterView:OnSkillCastingStart(skill)
else
self.RoleLiveGO3.transform:DORotate(Vector3.New(0,0, 0),0.5)
end
self.castingNameNode:GetComponent("Image").sprite = self.spLoader:LoadSprite(self.combat.skillname)
if self.combat.skillname then
self.castingNameNode:SetActive(true)
self.castingNameNode:GetComponent("Image").sprite = self.spLoader:LoadSprite(self.combat.skillname)
else
self.castingNameNode:SetActive(false)
end
self:PlaySpineAnim(self.RoleLiveGOGraphic3, 0, "attack" , false)
-- coroutine.wait(1.5)
--self.turnEffect:SetActive(false)

View File

@ -44,22 +44,32 @@ function PlayerView:onCreate(go, role, position, root)
self.hpPassSlider.fillAmount = self.hpCache
self.yujiaSlider.fillAmount = 0
local roleId=role.roleData.roleId
local live=HeroConfig[role.roleData.roleId].Live
-- 判断是否有皮肤
if not role.roleData.skinId or role.roleData.skinId == 0 then
-- 身外化身引导立绘展示处理
if roleId == 21061 then
self.skinId = 0
else
self.skinId = role.roleData.skinId
end
--如果英雄装备皮肤
if self.skinId and self.skinId > 0 then
roleId = self.skinId
local skin = ConfigManager.GetConfigDataByKey(ConfigName.HeroSkin,"Type",roleId)
if skin then
live = skin.Live
if NameManager.roleSex == ROLE_SEX.BOY then
self.livePath = "live2d_npc_boy"
else
self.livePath = "live2d_npc_girl"
end
else
local live=HeroConfig[role.roleData.roleId].Live
-- 判断是否有皮肤
if not role.roleData.skinId or role.roleData.skinId == 0 then
self.skinId = 0
else
self.skinId = role.roleData.skinId
end
--如果英雄装备皮肤
if self.skinId and self.skinId > 0 then
roleId = self.skinId
local skin = ConfigManager.GetConfigDataByKey(ConfigName.HeroSkin,"Type",roleId)
if skin then
live = skin.Live
end
end
self.livePath = GetResourcePath(live)
end
self.livePath = GetResourcePath(live)
self.play_liveScale = RoleConfig[roleId].play_liveScale
self.enemy_liveScale = RoleConfig[roleId].enemy_liveScale
self.offset = RoleConfig[roleId].offset