From 40480bba7073a9e7af8b984e574682c829e35f6c Mon Sep 17 00:00:00 2001 From: GL <2365963573@qq.com> Date: Fri, 10 Jan 2025 17:04:23 +0800 Subject: [PATCH] =?UTF-8?q?=E8=9D=99=E8=9D=A0bug=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Role/Attack.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Role/Attack.cs b/Role/Attack.cs index b356208..a594491 100644 --- a/Role/Attack.cs +++ b/Role/Attack.cs @@ -190,6 +190,7 @@ public class Attack : MonoBehaviour BulletGamobj.GetComponent().bulletData.BulletSpeed *= (1 + roleBulletSpeedAdd); BulletGamobj.GetComponent().Target = Target; BulletGamobj.transform.localScale=new Vector3(BulletGamobj.transform.localScale.x*(1+ BulletAddSize), BulletGamobj.transform.localScale.y * (1 + BulletAddSize), BulletGamobj.transform.localScale.z * (1 + BulletAddSize));//子弹放大 + // Debug.Log("子弹放大+++"+ BulletAddSize); BulletGamobj.transform.up = direction; BulletGamobj.transform.position = BulletStartPos.position; bulltes.Add(BulletGamobj); @@ -519,11 +520,10 @@ public class Attack : MonoBehaviour BulletGamobj.transform.up = scatterDirection; // 让子弹的"up"方向指向计算出的角度 BulletGamobj.transform.position = position; // 更新子弹的位置 - if (lastbulletLengthAdd != bulletLengthAdd) - { + // 根据 bulletLength 设置子弹的长度 BulletGamobj.transform.localScale = new Vector3(BulletGamobj.transform.localScale.x + bulletLengthAdd, BulletGamobj.transform.localScale.y, BulletGamobj.transform.localScale.z); - } + }