Add AI components and systems for enhanced enemy behavior and pathfinding
This commit is contained in:
20
GameCore/AI/AIComponent.cs
Normal file
20
GameCore/AI/AIComponent.cs
Normal file
@@ -0,0 +1,20 @@
|
||||
using GameCore.ECS;
|
||||
using GameCore.ECS.Interfaces;
|
||||
using GameCore.Math;
|
||||
|
||||
namespace GameCore.AI;
|
||||
|
||||
public class AIComponent : IComponent
|
||||
{
|
||||
public AIState CurrentState { get; set; } = AIState.Idle;
|
||||
public Entity? Target { get; set; }
|
||||
public float StateTimer { get; set; } = 0.0f;
|
||||
public Vector3 LastKnownTargetPosition { get; set; } = Vector3.Zero;
|
||||
|
||||
public float SightRange { get; set; } = 20.0f;
|
||||
public float FieldOfView { get; set; } = 90.0f; // in degrees
|
||||
public float AttackRange { get; set; } = 10.0f;
|
||||
public float ChaseGiveUpTime { get; set; } = 5.0f;
|
||||
public float ReactionTime { get; set; } = 0.5f;
|
||||
public float AttackRangeBufferPercent { get; set; } = 0.2f;
|
||||
}
|
||||
Reference in New Issue
Block a user