|
@@ -4,7 +4,7 @@ using UnityEngine;
|
|
|
|
|
|
|
|
public class YuMenGuan : Boss
|
|
public class YuMenGuan : Boss
|
|
|
{
|
|
{
|
|
|
- public enum AttackType
|
|
|
|
|
|
|
+ public enum AttackMethods
|
|
|
{
|
|
{
|
|
|
move = 0, //移动
|
|
move = 0, //移动
|
|
|
shockWave1 = 1, //单手砸地,两侧冲击波
|
|
shockWave1 = 1, //单手砸地,两侧冲击波
|
|
@@ -14,8 +14,46 @@ public class YuMenGuan : Boss
|
|
|
blackHand = 5, //黑手
|
|
blackHand = 5, //黑手
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- private void Move()
|
|
|
|
|
|
|
+ public enum AttackCategories
|
|
|
{
|
|
{
|
|
|
|
|
+ A = 0,
|
|
|
|
|
+ B = 0,
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ [System.Serializable]
|
|
|
|
|
+ public struct AttackType
|
|
|
|
|
+ {
|
|
|
|
|
+ public AttackCategories category;
|
|
|
|
|
+ public AttackMethods[] attacks;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ [Header("攻击配置")]
|
|
|
|
|
+ public AttackType[] attackConfigurations;
|
|
|
|
|
+
|
|
|
|
|
+ private void ToMove()
|
|
|
|
|
+ {
|
|
|
|
|
+ curTarget = TargetType.Tower;
|
|
|
|
|
+ CheckTarget();
|
|
|
canMove = true;
|
|
canMove = true;
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+ public override void OnMove()
|
|
|
|
|
+ {
|
|
|
|
|
+ if (!targetCharacter || targetCharacter.isDie)
|
|
|
|
|
+ {
|
|
|
|
|
+ CheckTarget();
|
|
|
|
|
+ }
|
|
|
|
|
+ if (Vector2.Distance(bodyTrans.position, targetCharacter.transform.position) <= 0.5f)
|
|
|
|
|
+ {
|
|
|
|
|
+ canMove = false;
|
|
|
|
|
+ rb.velocity = new Vector3(0, 0, 0);
|
|
|
|
|
+ }
|
|
|
|
|
+ Vector3 dir;
|
|
|
|
|
+ dir = bodyTrans.position.x <= targetCharacter.transform.position.x ? Vector3.right : Vector3.left;
|
|
|
|
|
+ if (dir.x * bodyTrans.localScale.x > 0)
|
|
|
|
|
+ {
|
|
|
|
|
+ Turn();
|
|
|
|
|
+ }
|
|
|
|
|
+ rb.velocity = dir * moveSpeed;
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|