Add AI components and systems for enhanced enemy behavior and pathfinding

This commit is contained in:
2025-10-30 21:53:20 +01:00
parent f65277e6b4
commit c7739de7d9
11 changed files with 370 additions and 6 deletions

View 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;
}