update 1.2.5

This commit is contained in:
2025-07-20 10:18:13 +08:00
parent 5396d3e4b8
commit 9d22e1c192
17 changed files with 313 additions and 115 deletions
@@ -449,6 +449,7 @@ namespace EmeraldAI
public void PlayAttackAnimation ()
{
if (!EmeraldComponent.CombatComponent.CurrentAttackData.CooldownIgnored) EmeraldComponent.CombatComponent.CurrentAttackData.CooldownTimeStamp = Time.time;
if (!EmeraldComponent.CombatComponent.CurrentAttackData.AbilityObject.CooldownSettings.Enabled) EmeraldComponent.CombatComponent.CurrentAttackData.CooldownTimeStamp = 0; //Set cooldown values that are disabled to 0
AIAnimator.SetInteger("Attack Index", EmeraldComponent.CombatComponent.CurrentAnimationIndex + 1);
AIAnimator.SetTrigger("Attack");
@@ -832,6 +832,12 @@ namespace EmeraldAI
/// </summary>
public void MovementUpdate ()
{
if (m_NavMeshAgent.isOnOffMeshLink)
{
m_NavMeshAgent.speed = 1f;
return;
}
CanReachTarget = CanReachTargetInternal();
AIAgentActive = m_NavMeshAgent.enabled;
@@ -952,7 +958,6 @@ namespace EmeraldAI
/// </summary>
public void StopBackingUp()
{
if (BackupCoroutine != null) StopCoroutine(BackupCoroutine);
EmeraldComponent.AIAnimator.SetBool("Walk Backwards", false);
EmeraldComponent.m_NavMeshAgent.stoppingDistance = EmeraldComponent.CombatComponent.AttackDistance;
BackingUpTimer = 0;
@@ -973,7 +978,7 @@ namespace EmeraldAI
{
BackupTimer = 0;
if (m_NavMeshAgent.remainingDistance <= EmeraldComponent.CombatComponent.TooCloseDistance && !DefaultMovementPaused)
if (EmeraldComponent.CombatComponent.DistanceFromTarget <= EmeraldComponent.CombatComponent.TooCloseDistance && !DefaultMovementPaused)
{
if (DestinationAdjustedAngle <= 90 && !AIAnimator.GetBool("Blocking"))
{