diff --git a/Assets/ManagedResources/~Lua/Modules/Battle/View/Unit/PlayerView.lua b/Assets/ManagedResources/~Lua/Modules/Battle/View/Unit/PlayerView.lua index 0d867aa277..2e3db02a0d 100644 --- a/Assets/ManagedResources/~Lua/Modules/Battle/View/Unit/PlayerView.lua +++ b/Assets/ManagedResources/~Lua/Modules/Battle/View/Unit/PlayerView.lua @@ -186,13 +186,14 @@ function PlayerView:onCreate(go, role, position, root) else self.RoleSkillLiveGoTran2.localPosition = Vector2.New(0, 0)-- * 0.5 end - self.RoleSkillLiveGoTran2.localScale = self.combat2.CloseRangeHitScale==nil and Vector3.one or Vector3.New( self.combat2.CloseRangeHitScale[1]/1000, self.combat2.CloseRangeHitScale[2]/1000,1) + self.RoleSkillLiveGoTran2.localScale = self.combat2.CloseRangeHitScale==nil and Vector3.New(10,10,1) or Vector3.New( self.combat2.CloseRangeHitScale[1]/1000, self.combat2.CloseRangeHitScale[2]/1000,1) self.RoleSkillLiveGoTran2.sizeDelta = Vector2.New(1000, 1000) self.RoleSkillLiveGoGraphic2 = self.RoleSkillLiveGo2:GetComponent("SkeletonGraphic") self.RoleSkillLiveGoGraphic2.AnimationState.TimeScale=self.combat2.SkillTimeScale/1000 -- local t= self.RoleLiveGOGraphic.SkeletonData.animations - self.RoleSkillLiveGoGraphic2.AnimationState:SetAnimation(0, "idle", true) - self.RoleSkillLiveGo2:SetActive(true) + self.RoleSkillLiveGoGraphic2.AnimationState:SetAnimation(0, "play_skill_self", true) + + self.RoleSkillLiveGo2:SetActive(false) end -- 卡牌立绘显示 @@ -529,7 +530,12 @@ function PlayerView:PlaySpineAnim(gog, time, name, isLoop) _complete = function(state) gog.AnimationState.Complete = gog.AnimationState.Complete - _complete self.currAniName="idle" - gog.AnimationState:SetAnimation(0, "idle", true) + + if endWith(gog.gameObject.name,"skill") then + gog.gameObject:SetActive(false) + else + gog.AnimationState:SetAnimation(0, "idle", true) + end end gog.AnimationState:ClearTracks() -- 清除上一个动画的影响(修复概率攻击动画播放错误的问题) self.currAniName=name @@ -571,23 +577,23 @@ function PlayerView:OnSkillPlay(type,combat) -- cardRenderMat:SetInt("_IsMask", 0) -- if self.role.roleData.roleId==10016 then -- type=1 - -- end - local humanname="attack" + -- end + local humanname="atk" local name="attack" if type ~=0 then - humanname="skill" + humanname="skill2" end self:PlaySpineAnim(self.RoleLiveGOGraphic, 0, humanname, false) if type==0 and self.RoleSkillLiveGoGraphic ~= nil then - self:PlaySpineAnim(self.RoleSkillLiveGoGraphic, 0, name, false) + self:PlaySpineAnim(self.RoleSkillLiveGoGraphic, 0, "attack", false) elseif self.RoleSkillLiveGoGraphic2~=nil and self.combat2.EffectType==8 then -- name="skill" -- local offset=Vector3.New(self.combat2.Offset[1],self.combat2.Offset[2],0) - + self.RoleSkillLiveGo2:SetActive(true) -- self.RoleSkillLiveGoGraphic2.gameObject.transform.localPosition=Vector3.New(self.combat2.Offset[1],self.combat2.Offset[2],0) - self:PlaySpineAnim(self.RoleSkillLiveGoGraphic2, 0, name, false) + self:PlaySpineAnim(self.RoleSkillLiveGoGraphic2, 0, "play_skill_self", false) end @@ -1054,7 +1060,7 @@ function PlayerView:OnDead() self.yujiaSlider.fillAmount = 0 --self.RoleLiveGO.gameObject:SetActive(false) self.lvHpObj:SetActive(false) - self:PlaySpineAnim(self.RoleLiveGOGraphic, 0, "death", false) + self:PlaySpineAnim(self.RoleLiveGOGraphic, 0, "die", false) --死亡后不把怒气条显示清空,处理触发不灭怒气不足四点 怒气条清空 2021/09/01 --self.rageSlider.fillAmount = 0 self.rageText.text = "" diff --git a/Assets/ManagedResources/~Lua/Modules/Battle/View/Unit/SkillCaster.lua b/Assets/ManagedResources/~Lua/Modules/Battle/View/Unit/SkillCaster.lua index ecbcbb83ea..495c8b6781 100644 --- a/Assets/ManagedResources/~Lua/Modules/Battle/View/Unit/SkillCaster.lua +++ b/Assets/ManagedResources/~Lua/Modules/Battle/View/Unit/SkillCaster.lua @@ -554,7 +554,7 @@ function SkillCaster:CheckFullSceenSkill(combat, skill,skillduration) if compnet~=nil then -- compnet.transform.localScale = Vector3.one * 3 -- compnet.transform.sizeDelta = Vector2.New(1000, 1000) - self.owner:PlaySpineAnim (compnet,0,"attack",true) + self.owner:PlaySpineAnim (compnet,0,"play_skill_self",true) end BattleManager.AddDelayRecycleRes(combat.Bullet, go2, combat.BulletTime==0 and 4 or combat.BulletTime/1000) end