|
|
@@ -70,6 +70,7 @@ public class Enemy : MoveCharacter
|
|
|
private AttackController.AttackMethod[] am;
|
|
|
private int len;
|
|
|
private float pastAttackTime;
|
|
|
+ private bool isConAttack; //连续攻击,不切idle动画
|
|
|
|
|
|
[Header("掉落魂")]
|
|
|
public int dropSoulMax = 3;
|
|
|
@@ -512,6 +513,11 @@ public class Enemy : MoveCharacter
|
|
|
attackController.JudgeTriggerOnOff();
|
|
|
if (attackController.attackTime <= 0)
|
|
|
{
|
|
|
+ isAttack = GetAttack();
|
|
|
+ if (isAttack)
|
|
|
+ {
|
|
|
+ isConAttack = true;
|
|
|
+ }
|
|
|
ChangeState(CharacterState.Idle);
|
|
|
break;
|
|
|
}
|
|
|
@@ -672,7 +678,10 @@ public class Enemy : MoveCharacter
|
|
|
switch (newState)
|
|
|
{
|
|
|
case CharacterState.Idle:
|
|
|
- ani.Play("idle", 0, 0);
|
|
|
+ if (!isConAttack)
|
|
|
+ {
|
|
|
+ ani.Play("idle", 0, 0);
|
|
|
+ }
|
|
|
rb.velocity = Vector3.zero;
|
|
|
//animalAni.SetInteger("state", (int)PlayerState.Idle);
|
|
|
break;
|