Add AI and Patrol components, update related resources and presenters

This commit is contained in:
2025-10-30 21:53:31 +01:00
parent 90d3abd83f
commit 5ea02e7bf9
18 changed files with 361 additions and 22 deletions

View File

@@ -4,6 +4,7 @@ using CryptonymThunder.Code.Autoloads;
using CryptonymThunder.Code.Factories;
using CryptonymThunder.Code.Resources;
using CryptonymThunder.Code.Services;
using GameCore.AI;
using GameCore.Attributes;
using GameCore.Combat;
using GameCore.Config;
@@ -101,6 +102,11 @@ public partial class GamePresenter : Node
_world.RegisterSystem(new HealingSystem(_world));
_world.RegisterSystem(new DamageSystem(_world));
_world.RegisterSystem(new AIPerceptionSystem());
_world.RegisterSystem(new AIPathfindingSystem());
_world.RegisterSystem(new AIAimSystem());
_world.RegisterSystem(new ProjectileCleanupSystem());
_world.RegisterSystem(new DestructionSystem());
@@ -112,6 +118,8 @@ public partial class GamePresenter : Node
var playerData = _presenterFactory.CreateEntityFromArchetype(PlayerArchetype);
_presenters.Add(playerData.Entity.Id, playerData.Presenter);
_presenterComponents.Add(playerData.Entity.Id, playerData.Components);
_world.GameState.SetStatus(GameStatus.InGame);
}
public override void _Input(InputEvent @event)