feat: Step 5 AI agent command bridge
- Add new Engine.AI project referenced by the App. - Define JSON command model: spawn_model, set_transform, delete_entity, list_entities. - Implement AiCommandProcessor with System.Text.Json and custom Vector3/Quaternion converters. - Wire processor into Program.cs; demo commands spawn and move a second cube. - AI commands are executed against the live Flecs world and visible in the next frame.
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
using System.Numerics;
|
||||
|
||||
namespace Engine.AI.Commands;
|
||||
|
||||
/// <summary>
|
||||
/// Spawn a named entity with a Mesh loaded from a model file and a Transform.
|
||||
/// </summary>
|
||||
public sealed record SpawnModelCommand : AiCommand
|
||||
{
|
||||
public required string Name { get; init; }
|
||||
public required string ModelPath { get; init; }
|
||||
public Vector3 Position { get; init; } = Vector3.Zero;
|
||||
public Quaternion Rotation { get; init; } = Quaternion.Identity;
|
||||
public Vector3 Scale { get; init; } = Vector3.One;
|
||||
}
|
||||
Reference in New Issue
Block a user