mirror of
https://github.com/GeWuYou/GFramework.git
synced 2026-03-22 10:34:30 +08:00
- 删除Position组件结构体定义 - 删除Velocity组件结构体定义 - 删除MovementSystem移动系统实现 - 移除ArchEcsModule ECS模块管理器 - 删除ArchSystemAdapter适配器基类 - 从ServiceModuleManager中移除ECS模块注册逻辑 - 从ArchitectureProperties中移除EnableEcs配置选项 - 删除ECS相关的单元测试文件 - 从项目文件中移除Arch和Arch.System包引用 - 从解决方案文件中移除ECS相关项目引用 - 更新项目配置文件中的目标框架和测试项目属性
34 lines
965 B
C#
34 lines
965 B
C#
using GFramework.Core.Abstractions.architecture;
|
|
using Microsoft.Extensions.DependencyInjection;
|
|
|
|
namespace GFramework.Ecs.Arch.extensions;
|
|
|
|
/// <summary>
|
|
/// Arch ECS 扩展方法
|
|
/// </summary>
|
|
public static class ArchExtensions
|
|
{
|
|
/// <summary>
|
|
/// 配置 Arch ECS 选项
|
|
/// </summary>
|
|
public static IServiceCollection ConfigureArch(
|
|
this IServiceCollection services,
|
|
Action<ArchOptions> configure)
|
|
{
|
|
var options = new ArchOptions();
|
|
configure(options);
|
|
services.AddSingleton(options);
|
|
return services;
|
|
}
|
|
|
|
/// <summary>
|
|
/// 显式启用 Arch ECS 模块(备选方案)
|
|
/// </summary>
|
|
public static TArchitecture UseArch<TArchitecture>(this TArchitecture architecture)
|
|
where TArchitecture : IArchitecture
|
|
{
|
|
// 此方法为显式注册提供支持
|
|
// 实际注册由 ModuleInitializer 自动完成
|
|
return architecture;
|
|
}
|
|
} |