|
|
@@ -1,3 +1,4 @@
|
|
|
+using Sirenix.OdinInspector;
|
|
|
using System.Collections;
|
|
|
using System.Collections.Generic;
|
|
|
using UnityEngine;
|
|
|
@@ -9,8 +10,8 @@ public class FanFlyingSwords : MonoBehaviour
|
|
|
public float angleRange;
|
|
|
public float arrivalAngle;
|
|
|
public int swordsNum;
|
|
|
- [Header("伤害")]public int damage;
|
|
|
- // Start is called before the first frame update
|
|
|
+ public int damage;
|
|
|
+ [LabelText("击打值")] public int attackValue;
|
|
|
public void Biu()
|
|
|
{
|
|
|
float angleInterval = angleRange / (float)(swordsNum - 1);
|
|
|
@@ -30,9 +31,10 @@ public class FanFlyingSwords : MonoBehaviour
|
|
|
}
|
|
|
angle = angle / 180 * Mathf.PI;
|
|
|
dir = new Vector3(Mathf.Cos(angle), Mathf.Sin(angle), 0);
|
|
|
- //先改角色attackInfo并读取,之后重做的时候再改
|
|
|
- owner.attackController.curAttackMethod.attackInfo.damage = damage;
|
|
|
- obj.GetComponent<Bullet>().BeShoot(owner, owner.transform.position + Vector3.up, dir, false);
|
|
|
+ AttackController.AttackMethod attackMethod = owner.attackController.curAttackMethod;
|
|
|
+ attackMethod.attackInfo.damage = damage;
|
|
|
+ attackMethod.attackInfo.attackValue = attackValue;
|
|
|
+ obj.GetComponent<Bullet>().BeShoot(owner, owner.transform.position + Vector3.up, dir, false, attackMethod: attackMethod);
|
|
|
}
|
|
|
|
|
|
}
|