Skip to content

Commit

Permalink
After death standing up of ai issue fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
baponkar committed Dec 30, 2022
1 parent 9c8d2e9 commit 9a22477
Show file tree
Hide file tree
Showing 6 changed files with 2,038 additions and 54 deletions.
43 changes: 0 additions & 43 deletions Assets/baponkar/DetectKey.cs

This file was deleted.

11 changes: 0 additions & 11 deletions Assets/baponkar/DetectKey.cs.meta

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,11 @@ public void Update(AiAgent agent)
}
timer = agent.config.maxTime;
}
else if(timer <= 0 && !agent.targetingSystem.HasTarget)
{
agent.stateMachine.ChangeState(AiStateId.FindTarget);
timer = agent.config.maxTime;
}

if(agent.targetingSystem.HasTarget && agent.targetingSystem.TargetDistance <= agent.config.attackRange)
{
Expand Down
1 change: 1 addition & 0 deletions Assets/baponkar/_baponkar_Enemy_AI/Scripts/AiDeathState.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ public void Update(AiAgent agent)
agent.transform.GetComponent<AiAgentLocomotion>().enabled = false;
//agent.transform.GetComponent<AiWeapons>().enabled = false;
agent.transform.GetComponent<AiVisonSensor>().enabled = false;
agent.transform.GetComponent<SphereCollider>().enabled = false;
}


Expand Down
Loading

0 comments on commit 9a22477

Please sign in to comment.