diff --git a/Assets/ManagedResources/~Lua/Modules/Battle/View/Unit/MonsterView.lua b/Assets/ManagedResources/~Lua/Modules/Battle/View/Unit/MonsterView.lua index 439684eddb..cf5ad1e923 100644 --- a/Assets/ManagedResources/~Lua/Modules/Battle/View/Unit/MonsterView.lua +++ b/Assets/ManagedResources/~Lua/Modules/Battle/View/Unit/MonsterView.lua @@ -128,16 +128,20 @@ function MonsterView:onCreate(go, role, position, root) end local scale = self.camp == 0 and self.play_liveScale or self.enemy_liveScale - self.RoleLiveGO2.transform.localScale = Vector3.one * scale --* 2 - self.RoleLiveGO2:SetActive(false) - self.RoleLiveGOGraphic2 = self.RoleLiveGO2:GetComponent("SkeletonGraphic") - self.RoleLiveGOTran2 = self.RoleLiveGO2:GetComponent("RectTransform") - self.RoleLiveGOGraphic2.AnimationState:SetAnimation(0, "idle", true) - self.RoleLiveGOTran2.sizeDelta = Vector2.New(1000, 1000) + self.RoleLiveGO2.transform.localScale = Vector3.one * scale --* 2 + self.RoleLiveGO2:SetActive(false) + self.RoleLiveGOGraphic2 = self.RoleLiveGO2:GetComponent("SkeletonGraphic") + self.RoleLiveGOTran2 = self.RoleLiveGO2:GetComponent("RectTransform") + self.RoleLiveGOGraphic2.AnimationState:SetAnimation(0, "idle", true) + self.RoleLiveGOTran2.sizeDelta = Vector2.New(1000, 1000) else - if self.lingshouIcon then + --LogError("self.config.Picture==============="..self.config.Picture) + if self.lingshouIcon and self.config.Picture then self.lingshouIcon.gameObject:SetActive(true) + self.lingshouIcon:GetComponent("Image").sprite=self.spLoader:LoadSprite(GetResourcePath(self.config.Picture)) + else + self.lingshouIcon.gameObject:SetActive(false) end end -- 创建技能播放器 @@ -253,7 +257,12 @@ function MonsterView:OnSkillCastStart(skill) local eid = BattleManager.GetCombatIdBySkin(skill.id, skill.owner.skinId) self.combat = BattleManager.GetSkillCombat(eid) else - self.lingshouIcon:SetActive(true) + if self.isMainPlayer then + self.lingshouIcon:SetActive(false) + else + self.lingshouIcon:SetActive(true) + end + self.RoleLiveGO3=nil end end