update readme

This commit is contained in:
Mikhail 2026-03-29 17:33:11 +08:00
parent 541233c237
commit 8034709702
2 changed files with 17 additions and 17 deletions

View File

@ -121,16 +121,16 @@ EcsDefaultWorld _world;
Так же AutoInjections упрощает построение аспектов. Для этого есть следующие атрибуты: Так же AutoInjections упрощает построение аспектов. Для этого есть следующие атрибуты:
Атрибуты для инициализации полей с пулами: Атрибуты для инициализации полей с пулами:
* `[Inc]` - кеширует пул и добавит тип компонента в включающее ограничение аспекта, аналог метода `Include`; * `[Inc]` - кеширует пул и добавит тип компонента в включающее ограничение аспекта, аналог метода `Inc<T>()`;
* `[Exc]` - кеширует пул и добавит тип компонента в исключающее ограничение аспекта, аналог метода `Exclude`; * `[Exc]` - кеширует пул и добавит тип компонента в исключающее ограничение аспекта, аналог метода `Exc<T>()`;
* `[Opt]` - только кеширует пул, аналог метода `Optional`; * `[Opt]` - только кеширует пул, аналог метода `Opt<T>()`;
Атрибут для комбинирования аспектов: Атрибут для комбинирования аспектов:
* `[Combine(order)]` - кеширует аспект и скомбинирует ограничения аспектов, аналог метода `Combine`, аргумент `order` задает порядок комбинирования, по умлочанию `order = 0`; * `[Combine(order)]` - кеширует аспект и скомбинирует ограничения аспектов, аналог метода `Combine<TOtherAspect>(int)`, аргумент `order` задает порядок комбинирования, по умлочанию `order = 0`;
Дополнительные атрибуты только для задания ограничений аспекта. Их можно применить к самому аспекту, либо к любому полю внутри. Используйте атрибуты: Дополнительные атрибуты только для задания ограничений аспекта. Их можно применить к самому аспекту, либо к любому полю внутри. Используйте атрибуты:
* `[IncImplicit(type)]` - добавит в включающее ограничение указанный в конструкторе тип `type`, аналог метода `Include`; * `[IncImplicit(type)]` - добавит в включающее ограничение указанный в конструкторе тип `type`, аналог метода `Inc<T>()`;
* `[ExcImplicit(type)]` - добавит в исключающее ограничение указанный в конструкторе тип `type`, аналог метода `Exclude`; * `[ExcImplicit(type)]` - добавит в исключающее ограничение указанный в конструкторе тип `type`, аналог метода `Exc<T>()`;
</br> </br>
@ -198,9 +198,9 @@ class VelocitySystem : IEcsRun, IEcsInject<EcsDefaultWorld>, IEcsInject<TimeServ
public EcsPool<Velocity> velocities; public EcsPool<Velocity> velocities;
public Aspect(Builder b) public Aspect(Builder b)
{ {
b.Exclude<FreezedTag>(); b.Exc<FreezedTag>();
poses = b.Include<Pose>(); poses = b.Ince<Pose>();
velocities = b.Include<Velocity>(); velocities = b.Inc<Velocity>();
} }
} }

View File

@ -122,16 +122,16 @@ EcsDefaultWorld _world;
AutoInjections also simplifies building aspects. The following attributes are available: AutoInjections also simplifies building aspects. The following attributes are available:
Attributes for initializing pool fields: Attributes for initializing pool fields:
* `[Inc]` - caches the pool and adds the component type to the include constraint of the aspect (equivalent to `Include<T>()`); * `[Inc]` - caches the pool and adds the component type to the include constraint of the aspect (equivalent to `Inc<T>()`);
* `[Exc]` - caches the pool and adds the component type to the exclude constraint (equivalent to `Exclude<T>()`); * `[Exc]` - caches the pool and adds the component type to the exclude constraint (equivalent to `Exc<T>()`);
* `[Opt]` - only caches the pool (equivalent to `Optional<T>`); * `[Opt]` - only caches the pool (equivalent to `Opt<T>`);
* *
Attribute for combining aspects: Attribute for combining aspects:
* `[Combine(order)]` - caches the aspect and merges constraints from aspects (equivalent to `Combine<TOtherAspect>(int)`); order sets combine order (default 0); * `[Combine(order)]` - caches the aspect and merges constraints from aspects (equivalent to `Combine<TOtherAspect>(int)`); order sets combine order (default 0);
Additional attributes for specifying aspect constraints. They can be applied to the aspect itself or any field inside: Additional attributes for specifying aspect constraints. They can be applied to the aspect itself or any field inside:
* `[IncImplicit(type)]` - adds Type from the constructor to the include constraint (equivalent to `Include<T>()`); * `[IncImplicit(type)]` - adds Type from the constructor to the include constraint (equivalent to `Inc<T>()`);
* `[ExcImplicit(type)]` - adds Type from the constructor to the exclude constraint (equivalent to `Exclude<T>()`); * `[ExcImplicit(type)]` - adds Type from the constructor to the exclude constraint (equivalent to `Exc<T>()`);
</br> </br>
@ -200,9 +200,9 @@ class VelocitySystem : IEcsRun, IEcsInject<EcsDefaultWorld>, IEcsInject<TimeServ
public EcsPool<Velocity> velocities; public EcsPool<Velocity> velocities;
public Aspect(Builder b) public Aspect(Builder b)
{ {
b.Exclude<FreezedTag>(); b.Exc<FreezedTag>();
poses = b.Include<Pose>(); poses = b.Inc<Pose>();
velocities = b.Include<Velocity>(); velocities = b.Inc<Velocity>();
} }
} }