改了动画参数
This commit is contained in:
parent
838821f0a9
commit
992d14d1f9
@ -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<CircleCollider2D>();
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
while (true)
|
||||
{
|
||||
if (circleCollider2D)
|
||||
@ -211,4 +217,7 @@ public class Attack : MonoBehaviour
|
||||
{
|
||||
bulltes.Clear();
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user