anim is gooder
This commit is contained in:
@@ -11,7 +11,7 @@ public class BossController : MonoBehaviour
|
||||
[SerializeField] private float maxHp = 500f;
|
||||
[SerializeField] private float currentHp = 500f;
|
||||
[SerializeField] public float chaseRange = 15f;
|
||||
[SerializeField] public float biteRange = 8f;
|
||||
[SerializeField] public float biteRange = 5f;
|
||||
|
||||
[Header("必殺技(天井)設定")]
|
||||
[Tooltip("天井の待機座標となる空のGameObjectのTransformを指定してください")]
|
||||
@@ -197,6 +197,21 @@ public class BossController : MonoBehaviour
|
||||
Destroy(web, duration); // 数秒後に自動消滅
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// ★超重要:アニメーターに残ってしまった不要なトリガーをすべて強制消去(リセット)する
|
||||
/// これを各ステートのExit時に呼ぶことで、アニメーションが固まる・遅れて暴発するバグを根絶します
|
||||
/// </summary>
|
||||
public void ResetAllAnimationTriggers()
|
||||
{
|
||||
if (Anim == null) return;
|
||||
Anim.ResetTrigger("Attack_Bite");
|
||||
Anim.ResetTrigger("Attack_Roar");
|
||||
Anim.ResetTrigger("ChargeStart");
|
||||
Anim.ResetTrigger("JumpUp");
|
||||
Anim.ResetTrigger("Land");
|
||||
Anim.ResetTrigger("StunStart");
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user