From 992d14d1f9039e6d189495ddd16e904b88090ae3 Mon Sep 17 00:00:00 2001 From: GL <2365963573@qq.com> Date: Mon, 23 Dec 2024 14:28:04 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E4=BA=86=E5=8A=A8=E7=94=BB=E5=8F=82?= =?UTF-8?q?=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Role/Attack.cs | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/Role/Attack.cs b/Role/Attack.cs index 3b67420..3b0c2a0 100644 --- a/Role/Attack.cs +++ b/Role/Attack.cs @@ -5,6 +5,7 @@ using System.Linq; using System.Threading.Tasks; using UnityEngine; using Debug = UnityEngine.Debug; +using UnityEditor.Animations; public class Attack : MonoBehaviour { @@ -24,7 +25,7 @@ public class Attack : MonoBehaviour [Header("火焰动画控制器")] public Animator fireAni; [Header("子弹起始点")] public Transform BulletStartPos; - + [Header("攻击速度")] public float AttackSpeed=1f; public Vector2 direction; public float AttackScope { @@ -44,9 +45,14 @@ public class Attack : MonoBehaviour AttackScope = attackScope; bulletData = new BulletData(); bulletData.BulletScattering = 1; - + animator.SetFloat("AttackSpeed",AttackSpeed); + CircleCollider2D circleCollider2D = GetComponent(); + + + + while (true) { if (circleCollider2D) @@ -211,4 +217,7 @@ public class Attack : MonoBehaviour { bulltes.Clear(); } + + + }