From 108e5b25683d5b2a432c38b170400eeb305295f0 Mon Sep 17 00:00:00 2001 From: gaoxin Date: Mon, 2 Nov 2020 23:19:52 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E6=88=98=E6=96=97=E3=80=91=E5=89=8D?= =?UTF-8?q?=E6=91=87=E7=89=B9=E6=95=88=E6=B7=BB=E5=8A=A0=E6=8C=87=E5=AE=9A?= =?UTF-8?q?=E4=BD=8D=E7=BD=AE=E9=87=8A=E6=94=BE=E7=9A=84=E7=B1=BB=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../~Lua/Modules/Battle/View/Unit/SkillCaster.lua | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/Assets/ManagedResources/~Lua/Modules/Battle/View/Unit/SkillCaster.lua b/Assets/ManagedResources/~Lua/Modules/Battle/View/Unit/SkillCaster.lua index 23e1c0aa1a..7c19bb6391 100644 --- a/Assets/ManagedResources/~Lua/Modules/Battle/View/Unit/SkillCaster.lua +++ b/Assets/ManagedResources/~Lua/Modules/Battle/View/Unit/SkillCaster.lua @@ -175,7 +175,7 @@ function SkillCaster:GetEffectPosition(skill) local targetPos = targets[1].position - if chooseLimit == 0 then + if chooseLimit == 0 or chooseLimit == 4 or chooseLimit == 5 then return targetCamp == 0 and FullEffectPosition.My_All or FullEffectPosition.Enemy_All elseif chooseLimit == 1 or chooseLimit == 2 then if targetCamp == 0 then @@ -369,6 +369,7 @@ function SkillCaster:CheckSkillForoleEffect(combat, skill) local go local path = combat.BeforeBullet local offset = combat.BeforeOffset and Vector3.New(combat.BeforeOffset[1], combat.BeforeOffset[2], 0) or Vector3.zero + local pos = Vector3.zero -- 挂在人身上,以人物中心为原点 if combat.BeforeEffectType == 1 then @@ -389,6 +390,12 @@ function SkillCaster:CheckSkillForoleEffect(combat, skill) local sortingOrder = self.effectRoot:GetComponent("Canvas").sortingOrder go = BattleManager.LoadAsset(path, sortingOrder) go.transform:SetParent(self.effectRoot.transform) + + -- 根据目标位置 + elseif combat.BeforeEffectType == 3 then + pos = self:GetEffectPosition(skill) + go = BattleManager.LoadAsset(path, self.effectRoot:GetComponent("Canvas").sortingOrder) + go.transform:SetParent(self.effectRoot.transform) end -- 检测特效旋转 @@ -398,7 +405,7 @@ function SkillCaster:CheckSkillForoleEffect(combat, skill) go.transform.localScale = Vector3.one go.transform.localPosition = Vector3.zero - go.transform.anchoredPosition = offset + go.transform.anchoredPosition = offset + pos go:SetActive(true) BattleManager.AddDelayRecycleRes(path, go, 4) end