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(); } + + + }