diff --git a/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Base/Effect.lua b/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Base/Effect.lua index f92c62e3ff..a39272d7d9 100644 --- a/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Base/Effect.lua +++ b/Assets/ManagedResources/~Lua/Modules/Battle/Logic/Base/Effect.lua @@ -84,7 +84,7 @@ local effectList = { BattleUtil.RandomControl(f1, cb1, caster, target, f2,skill) end) end, - --[d]改变[a]属性[b]%,持续[c]秒 + --[a]属性[b]%,持续[c]秒[d]改变 --a[属性],b[float],c[int],d[改变类型] [4] = function(caster, target, args, interval, skill) local pro1 = args[1] diff --git a/Assets/ManagedResources/~Lua/Modules/Battle/View/Unit/MonsterView.lua b/Assets/ManagedResources/~Lua/Modules/Battle/View/Unit/MonsterView.lua index aa6e041554..f5e631d8e4 100644 --- a/Assets/ManagedResources/~Lua/Modules/Battle/View/Unit/MonsterView.lua +++ b/Assets/ManagedResources/~Lua/Modules/Battle/View/Unit/MonsterView.lua @@ -146,7 +146,8 @@ function MonsterView:PlaySpineAnim(gog, time, name, isLoop) end end --- + +local heroConfig=nil function MonsterView:OnSkillCastStart(skill) -- self.RoleLiveGO:SetActive(true) local name=nil @@ -154,7 +155,8 @@ function MonsterView:OnSkillCastStart(skill) if skill and skill.id and skill.id~=0 then local aaa=SkillLogicConfig[skill.id].Hero if aaa and aaa~=0 then - local liveId=ConfigManager.GetConfigData(ConfigName.HeroConfig,aaa).Live + heroConfig=ConfigManager.GetConfigData(ConfigName.HeroConfig,aaa) + local liveId=heroConfig.Live roleConfig=ConfigManager.GetConfigData(ConfigName.RoleConfig,aaa) if liveId then name=ConfigManager.GetConfigData(ConfigName.ArtResourcesConfig,liveId).Name @@ -179,14 +181,12 @@ function MonsterView:OnSkillCastStart(skill) self.RoleLiveGO3.transform.rotation=Vector3.New(0,180,0) end local scale = roleConfig.enemy_liveScale - LogError("scale===="..scale) self.RoleLiveGO3.transform.localScale = Vector3.one * scale --* 2 self.RoleLiveGO3:SetActive(false) self.RoleLiveGOGraphic3 = self.RoleLiveGO3:GetComponent("SkeletonGraphic") self.RoleLiveGOTran3 = self.RoleLiveGO3:GetComponent("RectTransform") self.RoleLiveGOGraphic3.AnimationState:SetAnimation(0, "attack", true) self.RoleLiveGOTran3.sizeDelta = Vector2.New(1000, 1000) - LogError("heroname==="..name) end end -- @@ -208,7 +208,11 @@ function MonsterView:OnSkillCastingStart(skill) animName="idle" end if self.RoleLiveGO3 then - self.RoleLiveGO3:GetComponent("RectTransform").rotation = Quaternion.Euler(Vector3.New(0, -90, 0)) + if (self.camp==0 and heroConfig and heroConfig.Toward==1) or (self.camp==1 and heroConfig and heroConfig.Toward==2) then + self.RoleLiveGO3:GetComponent("RectTransform").rotation = Quaternion.Euler(Vector3.New(0, 90, 0)) + else + self.RoleLiveGO3:GetComponent("RectTransform").rotation = Quaternion.Euler(Vector3.New(0, -90, 0)) + end self.RoleLiveGO2:GetComponent("RectTransform").rotation = Quaternion.Euler(Vector3.New(0, 0, 0)) coroutine.start(function() coroutine.wait(0.7) @@ -219,7 +223,12 @@ function MonsterView:OnSkillCastingStart(skill) self.RoleLiveGO2.gameObject:SetActive(false) self.RoleLiveGO3.gameObject:SetActive(true) - self.RoleLiveGO3.transform:DORotate(Vector3.New(0,0, 0),0.5) + if (self.camp==0 and heroConfig and heroConfig.Toward==1) or (self.camp==1 and heroConfig and heroConfig.Toward==2) then + self.RoleLiveGO3.transform:DORotate(Vector3.New(0,180, 0),0.5) + else + self.RoleLiveGO3.transform:DORotate(Vector3.New(0,0, 0),0.5) + end + animName="attack" self:PlaySpineAnim(self.RoleLiveGOGraphic3, 0,animName , false) coroutine.wait(1.5) @@ -256,6 +265,7 @@ function MonsterView:onDispose() -- poolManager:UnLoadLive(self.livePath, self.RoleLiveGO2) GameObject.DestroyImmediate(self.RoleLiveGO2) self.RoleLiveGO2 = nil + heroConfig=nil -- 回收本节点 BattlePool.RecycleItem(self.GameObject, BATTLE_POOL_TYPE.ENEMY_ROLE) end \ No newline at end of file