From eecb005cf6861dcc307fb16d30e98b25bdb41db5 Mon Sep 17 00:00:00 2001 From: liuliang <597380732@qq.com> Date: Thu, 12 Dec 2024 19:25:39 +0800 Subject: [PATCH] =?UTF-8?q?=E7=81=AB=E7=84=B0=E6=94=BB=E5=87=BB?= 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 df1f556..d248cc1 100644 --- a/Role/Attack.cs +++ b/Role/Attack.cs @@ -70,12 +70,12 @@ public class Attack : MonoBehaviour return; } - /*if(bulletPrefab.GetComponent().myBulletType==BulletType.Spraying) + if (bulletPrefab.GetComponent().myBulletType == BulletType.Spraying) { - + GameObject BulletGamobj = GameObject.Instantiate(bulletPrefab, this.transform.root); return; } - */ + Vector2 direction = (targetRole.transform.position - transform.position).normalized;